-
Notifications
You must be signed in to change notification settings - Fork 350
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
-Alint=trustArrayLenZero is not correctly working to recoganise @ArrayLen() annotation #6702
Comments
I'm sorry you are having trouble. Thanks! |
@mernst These are the results i found when I actually configured checker framework in one of the demo project. It says Unsupported Command line option : Alint=trustArrayLenZero I also pushed it to github, check it out if you want : Here |
@mernst, please let us know if we need to provide more details or something. |
|
Thanks for the help, it works ! |
@smillst Even after putting this
This is a not a good place to put your annotation, Also When I place it like this ; |
This is the expected place to put the array annotations. Here's the explanation: https://checkerframework.org/manual/#faq-array-syntax-meaning.
Because placing annotation before |
-Alint=trustArrayLenZero command line option is suggested to resolve the errors created by CF for
toArray()
method.Reference
We have tried to resolve the error :
https://github.com/checkstyle/checkstyle/blob/b16e96a757ccee5be66fabb8e666823ca3cb558a/config/checker-framework-suppressions/checker-nullness-optional-interning-suppressions.xml#L154-L163
created due to
toArray()
method. We tried to use@ArrayLen()
annotation in Checkstyle, but even after adding the command line option in pom.xml file, It either does'nt recoganises the@ArrayLen()
or not works correctly.Link to the PR
Passed the command in
<CompilerArguments>
like this :<Alint>trustArrayZeroLen</Alint>
The text was updated successfully, but these errors were encountered: