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
Gradle, perfTest, Checkstyle #338
Conversation
allowStaticMemberImports=true
These rules are great :) But as always, I have some suggestions for improvement: IMHO every checkstyle rule should at least be briefly described inline, e.g.
That way you don't have to got back and forth between XML and their documentation, which makes the rules way easier to understand :) Also I think that
should be
|
Okay, I will add a short description to the rules. The line separator should be handled by git. My local java files have windows line separators (\r\n). |
New comments New rule: Indentation Removed rule: IllegalImport
Currently discussing inclusion of this pull request with Begla. |
Just tested this by pointing our Jenkins test job at @mkalb's branch - works! But it seems to aggressively flag everything protobuf and came up with more than 19 thousand violations just there :D http://jenkins.movingblocks.net/job/TestCheckstyle/13/checkstyleResult/new/? Maybe there's a way to exclude that from something? :-) The new report modules seem clever though, was able to home in on some valid violations very easily, like whitespace quirks. I think this'll be a great help to make the code more consistent and a lot of the reports can be fixed easily by new contributors eager to find something easy to work on Maybe we can sort the different modules a little by priority now that we have more of them? Whitespace should probably be low, missing brackets and stuff like that high. |
Suppression for protobuf Changed severity to warning for some checks.
I added a suppression file with a suppression for protobuf. |
Looking good! http://jenkins.movingblocks.net/job/TestCheckstyle/ Still going yellow from the unit tests and what not, but thinking about enabling it for Develop anyway, maybe we can encourage some beginning coders to help cut down on the stats. There are some cute "game" plugins for Jenkins to reward stuff like that. Just saw a new one that looks interesting and it works with Git. Sneaky project is in beta and you need to sign up 3 friends/team members to get in, anybody up for it? ;-) http://buildcoin.com?lrRef=cm2Vn The more usual one is over at https://wiki.jenkins-ci.org/display/JENKINS/The+Continuous+Integration+Game+plugin |
There are other useful check rules, but I think we should not start with more rules. The others can be added later. The "suppression" has a problem. I cannot use it with eclipse because eclipse need an other file path. Mabye I add a eclipse_checkstyle.xml. Can someone test it with IntelliJ IDEA. |
That's with an actual IDE plugin (or built-in module) for checkstyle, right? I've just tried via command line and Jenkins, should be able to dig something up for IntelliJ |
Yes, Eclipse has an external checkstyle plugin. I commited a fix for this eclipse plugin. |
Thanks :-) |
@Cervator I didn't want to close this pull request. It works with IDEA :-)
It works now with gradle command line, Jenkins, Eclipse and IDEA. |
Nice! Looks great. Have enabled for the primary job in Jenkins and we'll have to live with a yellow ball for a bit :D Could define some thresholds probably, especially for checkstyle (rather than unit tests), but no rush. In the meantime let the fixing of easy things begin! |
Incidentally, what's next? Findbugs? PMD? :D Seems Gradle and Jenkins supports them both - http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-usingFindbugs + https://wiki.jenkins-ci.org/display/JENKINS/PMD+Plugin etc I suppose we could analyze too much, however :-) |
I think we should wait with PMD and FindBugs. There are more useful checkstyle rules which we can add first. |
Works for me, might spread out the love a bit, leave more easy tasks for later :-) Then there's also Sonar to perhaps consolidate it all more later: http://www.sonarsource.org/ |
Please review and test first, before merging this PullRequest.
Forum discussions:
http://forum.movingblocks.net/threads/terasology-code-style-conventions.501/
http://forum.movingblocks.net/threads/rename-perftest.529/