Skip to content

Conversation

@ab22593k
Copy link

@ab22593k ab22593k commented Oct 11, 2025

Add the --exclude option to the format command.

This option allows users to exclude specific files and directories from being formatted. The option accepts a list of patterns that can be file paths, directory names, or glob patterns.

  • Added excludePatterns to FormatterOptions.
  • Modified FormatCommand to include --exclude option in argParser.
  • Updated formatPaths to check and exclude files based on provided patterns.
  • Added tests to verify the exclude functionality.

Fixes: #864.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Note: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer.

Add the `--exclude` option to the format command.

This option allows users to exclude specific files and
directories from being formatted. The option accepts a list of
patterns that can be file paths, directory names, or glob patterns.

- Added `excludePatterns` to `FormatterOptions`.
- Modified `FormatCommand` to include `--exclude` option in
  `argParser`.
- Updated `formatPaths` to check and exclude files based on
  provided patterns.
- Added tests to verify the exclude functionality.
@google-cla
Copy link

google-cla bot commented Oct 11, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to exclude files

1 participant