dart_style icon indicating copy to clipboard operation
dart_style copied to clipboard

Output line that will be changed

Open feinstein opened this issue 4 years ago • 2 comments

Currently I can get a --dry-run which outputs the file to be changed, but I can't see what exactly will be changed. If I just do a dartfmt lib, dartfmt outputs the whole file.

I would like to have a mode for --dry-run where not only it will output the file path, but also the lines before and after the reformat is applied.

feinstein avatar Sep 07 '20 20:09 feinstein

This is a neat idea. I don't know when/if I'll ever find the time to do it, but I like it.

munificent avatar Sep 10 '20 17:09 munificent

~https://github.com/flutter/flutter/issues/120274~

~We really need this now that dart format is being deprecated!~

I found a solution with https://pub.dev/packages/dart_style

flutter pub run dart_style:format --dry-run --set-exit-if-changed . replicates the same result with flutter format

I would love to see this suggestion implemented though it would be epic

Shereef avatar Feb 08 '23 12:02 Shereef