Skip to content
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

Distinguish what files were changed in the output #36

Closed
lig opened this issue Nov 20, 2020 · 6 comments
Closed

Distinguish what files were changed in the output #36

lig opened this issue Nov 20, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@lig
Copy link
Contributor

lig commented Nov 20, 2020

Is your feature request related to a problem? Please describe.
It is not clear what files were changed from the import_sorter output. In fact. all files appear to be changed. I would like to review files that were changed by the tool. This could be especially useful when running import_sorter as a pre-commit hook.

Describe the solution you'd like
I would like to see just an "Ok" for files that were not changed and the current output for those that were.

Describe alternatives you've considered
There is none.

@github-actions
Copy link

👋 Hello! Thanks for submitting a issue! @Matt-Gleich will try to respond as soon as possible.

@gleich
Copy link
Member

gleich commented Nov 20, 2020

This sounds great! Do you think having the file name be yellow instead of green would work to signify that it wasn't updated?

@gleich gleich self-assigned this Nov 20, 2020
@gleich gleich added the enhancement New feature or request label Nov 20, 2020
@lig
Copy link
Contributor Author

lig commented Nov 20, 2020

Do you think having the file name be yellow instead of green would work to signify that it wasn't updated?

I guess. However, it is better to avoid relying on color only IMO as there are a lot of cases when color is not available, i.e. command output in an IDE or on CI, custom terminal color schemes, etc.

As for me, as long as the output is distinguishable in plain text the color doesn't really matter that much.

@gleich
Copy link
Member

gleich commented Nov 21, 2020

So it not shows the number of imports actually update in the file out of the total number of imports. See the change log for more info. Thanks for the suggestion!

@gleich gleich closed this as completed Nov 21, 2020
@lig
Copy link
Contributor Author

lig commented Nov 22, 2020

@Matt-Gleich looks like this will do it. Thanks!

@DanMossa
Copy link

DanMossa commented Feb 14, 2021

@Matt-Gleich
Would it be possible to pass in an argument to only print a line with sorted is more than 0?

This is currently how I'm showing that

flutter pub run import_sorter:main | grep 'Sorted [1-9].*'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants