-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Make some effort to comply with style guide #1379
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
Open
tomwhoiscontrary
wants to merge
2
commits into
junit-team:main
Choose a base branch
from
tomwhoiscontrary:comply-with-style-guide
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,7 @@ | |
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding> | ||
<arguments /> | ||
<gpg.keyname>67893CC4</gpg.keyname> | ||
<checkstyle.config.location>google_checks.xml</checkstyle.config.location> | ||
</properties> | ||
|
||
<dependencies> | ||
|
@@ -379,6 +380,31 @@ | |
<artifactId>maven-resources-plugin</artifactId> | ||
<version>2.7</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
<version>2.17</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>check</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<violationSeverity>error</violationSeverity> <!-- change to 'warning' to enforce strictly --> | ||
<violationIgnore>indentation</violationIgnore> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<!-- | ||
To apply: mvn googleformatter:format | ||
To repair indentation (BSD/Mac sed): git status -s | sed -En 's/^ M (src.*\.java)$/\1/p' | xargs sed -Ei '' 's/^( *)/\1\1/' | ||
--> | ||
<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 commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
|
@@ -452,6 +478,11 @@ | |
</reportSet> | ||
</reportSets> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
<version>2.17</version> | ||
</plugin> | ||
</plugins> | ||
</reporting> | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!