Skip to content
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 sure sonar or compiler fails on warnings #271

Open
magwas opened this issue Mar 17, 2019 · 5 comments
Open

make sure sonar or compiler fails on warnings #271

magwas opened this issue Mar 17, 2019 · 5 comments

Comments

@magwas
Copy link
Member

magwas commented Mar 17, 2019

No description provided.

@szirbucz
Copy link
Contributor

szirbucz commented Mar 21, 2019

@magwas Are compiler warnings enough or do we need Unused import, Unused local variable, etc... (What currently Eclipse crying for)
For the second one, I guess we need CheckStyle.

@magwas
Copy link
Member Author

magwas commented Mar 21, 2019

Either the CI build should fail or Sonar should block the merge. Even turning compiler warnings to errors in pom.xml is enough to consider this task to be done. The below is just additional details to see the big picture.
Be aware that I am working on code duplication detection right now, and as a side effect, PMD warnngs are also brought to Sonar.
I do not focus on this though, and have no idea whether PMD, CheckStyle, or any other tool is best suited for static code analysis. And it cannot hurt if we check with multiple tools.

@szirbucz
Copy link
Contributor

szirbucz

@magwas
Copy link
Member Author

magwas commented Mar 21, 2019

And yes, everything Eclipse is showing as a warning should lead toblocking the merge.

@szirbucz
Copy link
Contributor

szirbucz commented Mar 21, 2019

@magwas For static analysis I vote for PMD. On my last project we used both CheckStyle and PMD, because they are good for different goals.
CheckStyle checks the coding conventions, like indentation, spaces around brackets, naming conventions, length of line, etc...
PMD does real static analysis and discovers code smells, code duplication and possible bugs.

szirbucz added a commit to szirbucz/PDEngine that referenced this issue Mar 21, 2019
szirbucz added a commit to szirbucz/PDEngine that referenced this issue Mar 21, 2019
magwas pushed a commit that referenced this issue Mar 21, 2019
* Break the compilation on warnings #271

* Remove redundant parts #271
@magwas magwas added 5 - Done and removed 1 - Ready labels Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants