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
Auto-unboxing issue in CheckstyleAuditListener #199
Comments
Code is at Line 106 in e167452
Line 160 in e167452
I'm not sure why code would rather use Lines 164 to 166 in e167452
I guess this is because it has to select a line and was expecting to not select anything with null . I would think this is the code we change to not return null but instead default to 1 .
|
So why wasn't this an issue in sonar before but it is now? Or was this always a problem and no one run checks that flagged line 0 to notice? |
Return 1 if the Checkstyle event contained anything other than a real line number. Do not use null anymore for this.
Return 1 if the Checkstyle event contained anything other than a real line number. Do not use null anymore for this.
Return 1 if the Checkstyle event contained anything other than a real line number. Do not use null anymore for this.
Return 1 if the Checkstyle event contained anything other than a real line number. Do not use null anymore for this.
Return 1 if the Checkstyle event contained anything other than a real line number. Do not use null anymore for this.
Sonar version: 7.6
Checkstyle sonar plugin verson: 4.18
Steps to reproduce or description of problem:
Run any check which reports line 0 for an issue. This used to be the required behavior for checks that flag the entire file, and have no relation to the AST. For example FileSetChecks.
I know there was a breaking change in checkstyle/checkstyle#6000, changing the "magic" line number to 1. This kind of neutralizes this problem.
BUT: I noticed the problem running custom checks at work. I would expect some custom checks to be around that haven't noticed checkstyle/checkstyle#6000.
The error caused is this:
I have already fixed this, it's a small thing. PR upcoming.
The text was updated successfully, but these errors were encountered: