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
Warnings are not reported at the correct line number #139
Comments
Need too check this out! Partly this issue is known to me as the kotlin compiler somethings gives we wrong numbers for some nodes and for one specific formatting rule even throws an exception (OutOfBound but file is 100% ok!) ... |
Is this still on track for being resolved for 1.0.0 final? I'm asking because I see the RCs flying by without any update on this issue. |
@jbaginski fixed this for MaxLineLength. It is on track. Had no other complainings about line and column mismatches but this is an important thing if we want to build other tools around detekt's reports. |
Are there more rules which can report their warnings on the wrong lines? If yes, let's list them here, if no, let's close this issue. |
Will look into it soon. |
Took a sample in detekt. Line numbers are correct. Columns are incorrect when using tabs (they are interpreted as one). Nothing we can do about it, so I'm closing this. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics. |
I'm using this version of detekt: "1.0.0.M12.1"
The number of warnings reported are correct but the sometimes the line number where the rule is broken is not accurate.
I created a new project with only the following class as example:
https://gist.github.com/davidgyavol/bcd9bfdec7eb2af06fadac7718bf8a25
MaxLineLength is set to 100.
The following lines should break the rule: 180,181 but after i run detektCheck I get the following warnings related to the MaxLineLength check:
This reproduces with other checks too (EmptyClassBlock should be at line 80)
The text was updated successfully, but these errors were encountered: