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

Fix sonar warnings #6764

Closed
strkkk opened this issue May 14, 2019 · 8 comments

Comments

Projects
None yet
3 participants
@rnveach

This comment has been minimized.

Copy link
Member

commented May 14, 2019

@romani Is there any way to get these warnings as part of our CI as long as we can suppress some, like Replace this use of System.out or System.err by a logger?

@romani

This comment has been minimized.

Copy link
Member

commented May 14, 2019

I was not possible to set up custom gates (trigger of build failure) and suppressions. But now it is possible to hook PR validation, but still no customization , or it need to be deeply investigated.

@romani romani added the approved label May 14, 2019

@romani

This comment has been minimized.

Copy link
Member

commented May 15, 2019

https://www.java67.com/2018/03/java-convert-string-to-boolean.html?m=1

The parseBoolean() returns a primitive boolean value while valueOf() returns a Boolean object.

@romani

This comment has been minimized.

Copy link
Member

commented May 15, 2019

4

I am not sure this is good suggestion.
Let's try and see ... But in separate commit to not block others.

@rnveach

This comment has been minimized.

Copy link
Member

commented May 15, 2019

4

I am not sure this is good suggestion.

At one point we discussed requiring curly braces for lambdas if they span more then 1 line just like if we had an if statement that spanned a line. That is probably why some of those lines have curly braces.
See #3837

strkkk added a commit to strkkk/checkstyle that referenced this issue May 15, 2019

@strkkk

This comment has been minimized.

Copy link
Contributor Author

commented May 15, 2019

@romani @rnveach some lines will be longer than 100 chars if we put whole lambda in one line.
And yes, if lambda has more than one line, CI requires braces.
Here lambda is short enough to be one-liner.

May be sonar quality gate should be adjust to ignore this issues.

@romani

This comment has been minimized.

Copy link
Member

commented May 15, 2019

Now it is possible to mark violation as won't fix in web ui.
I marked it , on next build it should disappear.

strkkk added a commit to strkkk/checkstyle that referenced this issue May 17, 2019

rnveach added a commit that referenced this issue May 17, 2019

@rnveach

This comment has been minimized.

Copy link
Member

commented May 17, 2019

Fixes were merged.

@rnveach rnveach closed this May 17, 2019

@rnveach rnveach added this to the 8.21 milestone May 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.