-
Notifications
You must be signed in to change notification settings - Fork 64
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
Restoring Comment Matcher Functionality #1388
Merged
Merged
Conversation
This file contains 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
@konradweiss this restores the old logic. However the test fails. I think it's somewhere in the CommentMatcher logic, as the debugger says there are only 7 comments created while I see 10 calls to the CommentMatcher. |
…g to be resiliant to _ast naming in other Python versions
…onally trigger when a # was found, reverting tests. The test still fails, apparently ParameterDeclarations have no location and so the assignment of comment to node based on the missing location fails
…/cpg into mk/pythonCommentMatcher
…nction. However an alternative would be the location spanning over all childrens locations
…it is to inaccurat, for location and code, revert block using the function as representative raw node
…n code anymore which will have to be discussed
oxisto
approved these changes
Jan 17, 2024
Quality Gate failedFailed conditions 48.1% Coverage on New Code (required ≥ 75%) |
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.
CommentMatcher functionality was not implemented in the recent python rewrite. This pr restores the functionality.
Reference to the old code:
cpg/cpg-language-python/src/main/python/cpg.py
Line 61 in c81ef60