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

Print the files that have been formatted successfully #372

Open
odiferousmint opened this issue Jul 28, 2020 · 4 comments
Open

Print the files that have been formatted successfully #372

odiferousmint opened this issue Jul 28, 2020 · 4 comments

Comments

@odiferousmint
Copy link

odiferousmint commented Jul 28, 2020

This is a feature request/suggestion.

I would like ktlintFormat to print a list of files that has been successfully formatted similarly to how googleJavaFormat (Gradle task) does it. Example:

/home/odiferousmint/foo/bar.java: formatted successfully
/home/odiferousmint/foo/baz.java: formatted successfully

I tried to set verbose to true but that did not help.

@Tapchicoma
Copy link
Collaborator

Currently plugin does not track what file are formatted by ktlint, but could start doing it in the future releases.

@odiferousmint
Copy link
Author

Currently plugin does not track what file are formatted by ktlint, but could start doing it in the future releases.

Thank you, that would be ideal and consistent with googleJavaFormat. I have a task that runs both that and ktlintFormat.

@JLLeitschuh
Copy link
Owner

Could you elaborate upon the use-case here? Why would you find this information to be valuable?

@odiferousmint
Copy link
Author

odiferousmint commented Jan 1, 2021

I would like to see which files were modified by the task/tool, and it is helpful when I have lots of files modified by me already. Plus googleJavaFormat reports it, so it would be consistent with it, then, and I like consistency.

There also have been cases where IntelliJ formatted the file improperly on save, and was different from that of googleJavaFormat, and I would like to catch such cases. It was related to the organization of imports in this case.

If you are going to implement this, please consider outputting the same thing that googleJavaFormat does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants