GoogleJavaFormat entry point does not sort imports or remove unused
See original GitHub issueThe current entry point in spotless/java/GoogleJavaFormat is the Formatter.formatSource
method which lacks fixing of import order and removal of unused imports.
If the entry point was changed to Main.main, the googleJavaFormat()
step would work as expected.
#28 would partly be solved - if one uses googleJavaFormat()
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
git - How to format code according to google java format
git-code-format-maven-plugin will sort imports (since version ... googleformatter-maven-plugin can optionally sort imports (not per default).
Read more >Index (Google Java Format 1.7 API) - javadoc.io
Formats an input string (a Java compilation unit) and fixes imports. Formatter - Class in com.google.googlejavaformat.java. This is google-java-format, a ...
Read more >pantsbuild.pants.contrib.googlejavaformat · PyPI
Pants is an Apache2 licensed build tool written in Python. The latest documentation can be found here. 1.10.x Stable Releases.
Read more >Set up Eclipse | Android Open Source Project
Under Organize > Imports, import the file android.importorder . Remove trailing whitespaces. To force Eclipse to remove all trailing whitespace:.
Read more >Changelog - isort
Fixed #1777: extend_skip is not honored wit a git submodule when skip_gitignore=true. ... Implemented #1645: Ability to reverse the import sorting order.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe, action item 1. can partly be resolved over at google-java-format – see referenced issue above. If it gets merged, the new entry point in
Formatter
can be used without doing too much classloader magic.Thank you! It worked and note to myself to be a little more thorough 😃
On Mon, Jan 6, 2020 at 8:26 PM Ned Twigg notifications@github.com wrote: