dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.09k stars 1.56k forks source link

Feature Request: Ability to Specify File List in dart fix --apply #56752

Open harsenad opened 7 hours ago

harsenad commented 7 hours ago

Hi Dart team,

I am currently using dart fix --apply, which works well when applied to a single file or an entire directory. However, I noticed there is no way to specify a list of files for this command. This limitation makes it challenging to use dart fix --apply in a pre-commit hook, as we need to manually update the analysis_options file to exclude files that are not part of the commit.

It would be incredibly useful if dart fix --apply had an option to apply fixes to a specified list of files. Is there already a way to achieve this, or could this be considered as a feature request?

Version of dart I am currently using : Dart SDK version: 3.5.2

Thank you for your time and consideration.

Best regards, Harshada Senad

dart-github-bot commented 7 hours ago

Summary: The user requests the ability to specify a list of files for the dart fix --apply command. Currently, it only accepts a single file or an entire directory, making it difficult to use in pre-commit hooks where only specific files need to be fixed.