-
Notifications
You must be signed in to change notification settings - Fork 184
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
JS-280 Support unknown nodes in AST protobuf file #4786
Conversation
@@ -467,3 +469,7 @@ message FunctionExpression { | |||
optional bool generator = 4; | |||
optional bool async = 5; | |||
} | |||
|
|||
message UnknownNode { | |||
string astNodeType = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT?
string astNodeType = 1; | |
string rawType = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you accept this change, you will have to adapt the other estree.proto
files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, why so many repeated proto files? I think one should be source of truth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are repeated because we didn't want to create coupling between the different modules. If we can find a better solution, it would be nice. See https://sonarsource.atlassian.net/browse/JS-197
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, we will remove the deprecated scripts in tools/estree and only keep a script similar to copy-to-lib.js, named copy-to-plugin.js
that copies the original in the bridge to the copy in the plugin.
We should also adapt the header comments in the protofile to identify:
- which one is the original
- which one the copy
- by what script they are maintained in sync
sonar-plugin/bridge/src/test/java/org/sonar/plugins/javascript/bridge/ESTreeFactoryTest.java
Outdated
Show resolved
Hide resolved
sonar-plugin/bridge/src/test/java/org/sonar/plugins/javascript/bridge/ESTreeFactoryTest.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes https://sonarsource.atlassian.net/browse/JS-280