-
Notifications
You must be signed in to change notification settings - Fork 78
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
ALTER INDEX throws exception #124
Comments
Can't seem to edit the issue but my version is: I switched from zpa-toolkit-2.3.0 because the search was throwing a class not found exception: |
Hi! In the "configuration" tab of zpa-toolkit you can change the "Error recovery" property to true. Changing this will make the parser more tolerant and simply ignore the CREATE INDEX. Btw, the "error recovery" is set by default in the SonarQube plugin. Does it solve your problem? If you want to create a rule to check specifically for the CREATE INDEX command please let me know. :-) |
Thanks, your solution worked! Just a little background on why I'm using it for INDEXES. We have a lot of SQL scripts that need to be applied to the DB, and the execution is done by a robot using an owner that's not the application's schema, so a solution would be to parse the SQL files using the scanner to locate DDLs that don't have an owner defined. I'm creating a custom rule that find xPaths like: //CREATE_PACKAGE/UNIT_NAME[count(./IDENTIFIER_NAME) < 2] It would be great if the parser had support for indexes as well. |
SQL file:
alter index test.test nologging;
Exception:
com.sonar.sslr.api.RecognitionException: Parse error at line 1 column 6:
--> alter index test.test nologging;
2: /EOF
The text was updated successfully, but these errors were encountered: