ktlint-gradle
ktlint-gradle copied to clipboard
Print the files that have been formatted successfully
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.
Currently plugin does not track what file are formatted by ktlint, but could start doing it in the future releases.
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.
Could you elaborate upon the use-case here? Why would you find this information to be valuable?
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.