-
Notifications
You must be signed in to change notification settings - Fork 363
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
Refactoring: AST parser errors not enough verbose. #476
Comments
In fact the message present by the rule is even redundant when looking in web ui since those are contextualized along with source code. |
Fixed with #484? |
Improve verbosity of parser in case of error is an enhancement => next version |
Ok On Thu, Apr 23, 2015, 10:34 Günter Wirth [email protected] wrote:
|
Maybe add somehow AstXmlPrinter to ParsingErrorCheck? package com.sonar.sslr.impl.ast;
AstXmlPrinter.print(astNode) |
Don't know if this is the right way but found this in JavaScript plugin. They seem to create a syntax/grammar tree and use it for more detailed output. Looks a little bit more complicated? https://github.com/SonarCommunity/sonar-javascript/blob/39f07ae651985b80511110574fd0a83c4cb8518a/javascript-squid/src/main/java/org/sonar/javascript/parser/sslr/ActionParser2.java |
Looks promising and will definitely improve the parser error detection. |
Not solvable. |
We have things like this:
19:33:09.634 ERROR - Parse error at line 298 column 30:
290: (char *)s_GetTranslationCB(message));
291: else
292: result = s_CancelDialog.SetProgressTextCB(nbar, 0 );
293: }
294:
295: return result;
296: }
297:
--> int cncl_set_progress_pos(int NumberOfBar, int PercentCompleted)
299: {
300: int Result = 0;
301: static int sLastDisplayed = -1;
302:
303:
304:
305:
306: if(PercentCompleted < 0 || PercentCompleted > 100)
307: {
Have no idea why this is failing. earlier the stack trace of the parser failure was more informative than its now. Shouldnt it be better to have more info than less
The text was updated successfully, but these errors were encountered: