-
-
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
InvalidJavadocPosition: false positive when comment is between javadoc and package #7430
Comments
This is different than #43 because of the code being used in checkstyle. In the other issue we have a token and are searching for the javadoc. This code we have a javadoc and are looking for the target to see if it is in the correct position. |
@rnveach , why you think we should report violation on 1st comment? There are cases then user use license header in javadoc format (not very good, but not that much people care about difference between multiline comment and javadoc comment), and here is just another example - http://rveach.no-ip.org/checkstyle/regression/reports/285/pmd/index.html#A1 It is kind hard decision when we should do same as javadoc tool and when behave differently. |
@romani As stated above, first comment is not a javadoc and will not be sent to the html report in the javadoc tool. I confirmed this locally before issue. If users want this in the javadoc they should merge the 2. |
problem is when user do not want to merge comments: first comment is license header, second is javadoc.
|
It doesn't change that it isn't a valid javadoc. It will not go to html report regardless of what user wants. Purpose of making it a javadoc is so it is treated as one but no tool will do that in this scenario. Tool will only pick the javadoc closest to the target. All others are ignored like regular comments. If this one file is issue for user then they should suppress it.
I don't know what you are referring to. No one has opened any issues to check's logic of identifying javadocs. |
I also can not find .... ok lets make it our Check stricter than tool. |
Its not stricter. Tool will not see 1 as a javadoc and will only use 2. |
fix is merged. |
Violation on line 1 is valid. There should be no error on line 2.
Javadoc tool seems to always choose the javadoc closest to the target. This is why 2 is valid and 1 isn't.
The text was updated successfully, but these errors were encountered: