Introduce maven checkstyle plugin#329
Conversation
yuokada
commented
Sep 9, 2022
- Introduce maven-checkstyle-plugin
- Reformat
- Reformat: fix import order
Codecov Report
@@ Coverage Diff @@
## master #329 +/- ##
=========================================
Coverage 94.93% 94.93%
Complexity 1938 1938
=========================================
Files 203 203
Lines 3866 3866
Branches 383 383
=========================================
Hits 3670 3670
Misses 100 100
Partials 96 96
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
We are already using spotless (https://github.com/diffplug/spotless) which gives autoformatting.... while checkstyle can not do this. |
|
@snuyanzin I didn't know about spotless itself.
As far as I checked, source files have different import order style. For example, the 2 following files have different import styles.
Are these code your intent? |
|
This is because of configuration https://github.com/datafaker-net/datafaker/blob/master/pom.xml#L203-L205 <java>
<googleJavaFormat>
<version>1.7</version>
<style>GOOGLE</style>
</googleJavaFormat>
<removeUnusedImports/>
</java>however as far as I remember @bodiam had some concerns about formatting |
|
I see.
Just my curious. I would like to know them if possible. |
|
Oh, not real concerns, but I don't ever want to encounter a failing build or anything like it because I put a space too many in some file, or because I use a * for the imports or the other way around. The formatting is "whatever IntelliJ's defaults are", and that's mostly it. I've probably been bitten too much about strict styles in corporate projects which almost add no value to a project, so I guess I'm a bit put off by tools like this. |
|
I would say this is where spotless could help with auto formatting |
|
Thank you for explanations. I understand policy for this repository. |
|
Not really a policy, plus we absolutely appreciate your contribution, I like to keep it as low on rules and process as possible, that's mostly it. |
|
The way we could continue is to double check if there is a way to configure google-java-format plugin in IntelijIdea and other IDEs to behave same way like it is mentioned in |