SONARPY-407 Ensure nodes in the AST have the rightfirstToken and lastToken#317
Merged
SONARPY-407 Ensure nodes in the AST have the rightfirstToken and lastToken#317
firstToken and lastToken#317Conversation
…y nodes. Add more tests on first and last token
f5886c9 to
e6aacd8
Compare
firstToken and lastToken
benzonico
requested changes
Sep 11, 2019
Contributor
benzonico
left a comment
There was a problem hiding this comment.
I believe you can also add a test about not having a first token null in one of the test of the base tree visitor. That would not be exhaustive but would still add a constraint to the tree.
| * null if class is defined without args : class Foo: | ||
| * empty list if class defined with empty parentheses : class Foo(): | ||
| * @return | ||
| */ |
Contributor
There was a problem hiding this comment.
I believe we lack quite some documentation around tree interfaces, what about updating it explaining in which cases this part of the tree is null rather than simply dropping it ?
hashicorp-vault-sonar-prod Bot
pushed a commit
that referenced
this pull request
Jun 6, 2025
GitOrigin-RevId: 6d1bb481a199fde32cfd7c564fa1ca284dce751c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.