Skip to content

Suggestion: Add a --verbose flag to dart fix --dry-run #49085

Open
@erf

Description

@erf

If you type dart-fix --dry-run now you will get info on which files will be changed, what type of fixes and how many, but not how the actual code will be changed.

I suggest adding a --verbose -v flag to dart fix --dry-run to show the code changes / diffs that will take place with dart fix --apply per fix.

E.g.
dart fix --dry-run -v

Could print:

dart fix --dry-run
Computing fixes in XXX (dry run)... 13.0s

7 proposed fixes in 2 files.

lib/api/somefile.dart
  prefer_const_declarations • 1 fix

Diff:
-            SizedBox(width: 16),
+            const SizedBox(width: 16),

I suggested this in reply to a Tweet from @mit-mit which asked me to file an issue.

  • Dart SDK version: 2.17.1
  • MacOSX

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.dart-cli-fixtype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions