-
Notifications
You must be signed in to change notification settings - Fork 27
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
CheckStyle failed for Invalid field access : length #517
Comments
My cmd line is: haxelib run checkstyle -s xxx.hx -c xxx\mycheckstyle.json -r xml -p xxx\report.xml --show-parser-errors When I delete the <--show-parser-errors> arg, the error msgs didn't show up and the program ran normally. |
well, do run a loop over an array someone has to read it's length to see if you're done iterating. I can see it running in a null pointer exception, when |
It crash for a specific file and I am sorry that I cannot offer you the file content because our code was not open-sourced. When I turn on --show-parser-errors, it will call < addError() > then call this line < reporter.addMessage(getErrorMessage(e, f.name, "Check " + name)); > but the message.related return from getErrorMessage() was null. So this message will cause the nullpointer exception. Am I wrong about this? |
alright, I see where the problem lies. fix incoming. nevertheless I am interested in what causes parsing to fail. can you reduce your file to a point where you can share it (while it still fails parsing)? |
should be fixed in checkstyle 2.8.4. |
TestLink.txt |
are you using a macro to handle stuff like |
To be honest, I have no idea what that is. It seems like a file with history, and I can not find anywhere defines a type XML. Maybe we don't even use these codes now. You can just ignore this question. -_-||| |
well since it is an error during anyway thanks for reporting an issue and your help identifying the underlying problem |
Invalid field access : length
Called from checkstyle/reporter/BaseReporter.hx line 114
Called from checkstyle/reporter/XMLReporter.hx line 120
Called from checkstyle/reporter/XMLReporter.hx line 58
Called from checkstyle/reporter/XMLReporter.hx line 45
Called from checkstyle/reporter/ReporterManager.hx line 44
Called from checkstyle/Main.hx line 225
Called from checkstyle/Main.hx line 134
Called from checkstyle/Main.hx line 121
Called from checkstyle/Main.hx line 318
cmd gives me these error msgs. line 114 in <BaseReporter.hx> is <for (related in message.related)>, how could this invoke ().length fuction? I am confused.
The text was updated successfully, but these errors were encountered: