Add spotless plugin configuration#4409
Conversation
pom.xml
Outdated
| <trimTrailingWhitespace/> | ||
| <endWithNewline/> | ||
| <indent> | ||
| <tabs>true</tabs> |
There was a problem hiding this comment.
Does this parameter mean that tabs are retained or replaced by spaces?
There was a problem hiding this comment.
This means tabs are retained, but this section doesn't cover java code (that's handled in the <java> section below) but instead just .gitattributes and .gitignore.
I think I'll just remove this section for now since the focus of this change should just be the java source files, which is already a large enough change
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4409 +/- ##
=========================================
Coverage 52.003% 52.003%
=========================================
Files 507 507
Lines 28654 28654
Branches 4969 4969
=========================================
Hits 14901 14901
Misses 11684 11684
Partials 2069 2069
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
|
See #4408 for an extended motivation.
Spotless supports a few Java formatters, but I personally like Palantir the most. It generally follows the google style guide for Java, with some nice readability improvements. Some more details can be found at https://github.com/diffplug/spotless/tree/2d21c62cdfb83237ca4a5f48ad3b143a0580c5be/plugin-maven#java and https://github.com/palantir/palantir-java-format