-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: introduce "code" option to FormatCommand
#1333
Comments
FormatCommand
The Given that, I think it's unlikely that we'll bother changing the API of |
Thanks @munificent for the quick reply. I'm happy with the suggested better solution. Is there a way I can track the work towards making |
I believe @keertip is working on this, or at least was intending to at some point. I'm not sure if she has any tracking issue for it. |
I'm not sure of the exact status, but I believe that |
Description
The
FormatCommand
should offer a--code
argument, as inFixCommand
to apply fixes to specific lint rules instead of using--fix-<non-standard-code>
(currently documented as used for non-whitespace changes only).Additional context
The
FormatCommand
is being consumed bydartdev
, a command-line utility for Dart development (part of the Dart SDK).The
package:dartdev
exposes aFixCommand
that accepts acode
argument. This is very useful, since it allows to explicitly resolve fixes for a specific linter rule.With
FixCommand
you can explicitly solve fordirectives_ordering
, by doing:dart fix --apply --code=directives_ordering # Solves for "directives_ordering"
However, the
FormatCommand
presents another solution which brings inconsistency to the overall Developer Experience offered by the command-line utility for Dart development.The text was updated successfully, but these errors were encountered: