-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Make some effort to comply with style guide #1379
base: main
Are you sure you want to change the base?
Make some effort to comply with style guide #1379
Conversation
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
<version>2.17</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the builds on Travis CI for jdk6 is failing. As far as I can see, this version of Checkstyle requires Java 7. If you could go on a lower version of Checkstyle, that might fix this build.
The actual problem is, if it should be possible to build Junit 4 on JDK 6? And if we don't build on JDK 6, does this imply that JUnit can no longer be used on JRE 6? And is this really still necessary, @kcooney and @marcphilipp ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should be possible to build it on JDK6. But to make sure we don't use any JDK > 5 APIs we should build using JDK 5.
Why shouldn't it be possible to use JUnit on JDK 6 if it wasn't build on JDK 6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it was possible to disable Checkstyle in the JDK 6 build, would that be okay? It's not as if the source code is any different between the JDK 6 and JDK 7/8 builds. Using a JDK 6-compatible version of something in 2016 seems a bit ludicrous.
In fact, i would argue that what you really want to do is build all the classes under whatever JDK you are going to use to build the releases, and then run the tests on the various target JDKs, to more accurately simulate what happens to users. I have no idea how to get Maven and Travis to do that, though!
--> | ||
<groupId>com.theoryinpractise</groupId> | ||
<artifactId>googleformatter-maven-plugin</artifactId> | ||
<version>1.0.6</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This relates to #1350, "Code base doesn't comply with JUnit's own coding style". It adds the Google Formatter to reformat the code, and Checkstyle to enforce compliance. It doesn't actually include a mass reformatting of code.
I'm not sure this is something you'd want to merge, but it might help understand the situation better.
Some observations:
So, whilst you might well want Checkstyle as part of the build, i'm skeptical that the Google Formatter is actually useful.