-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Line numbers should start at 1 #6000
Comments
it is better to print violation on some AST node, |
@romani this is a file set check, there is no ast. Also even though violation is on file X, it's message is saying file Y is missing. |
Ok, let's just have it be reported to first line - |
Hi, I'd like to solve this issue. Before creating a pull request, can we confirm one thing: do we want to report 1 or just print the file name? UPDATE: |
Fix was merged |
when the entire file is referred to by the flagged issue. This becomes necessary because of checkstyle/checkstyle#6000, where Checkstyle 8.13 silently introduced this change.
Similar to #4997 ,
https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocPackageCheck.java#L89
AST checks start at line 1. We should remove line 0 violations and make them start at 1.
If the violation, like the above, is on a missing file or the file as a whole, we should remove the line number completely and just print the file name.
Example:
CheckstyleBad.java: Missing package-info.java file
The text was updated successfully, but these errors were encountered: