Repository navigation
Update all dependencies to use tree-sitter v0.20 - #812
Closed
BrainBuzzer wants to merge 6 commits into
Closed
BrainBuzzer wants to merge 6 commits into
BrainBuzzer wants to merge 6 commits into
Conversation
JavaScript and Mozjs tests in the previous version had wrong code provided. The code that was provided previously was in the typescript style. With tree-sitter v0.19, it created an extra `expression_statement` and due to that, the false positive saying the `lloc` is 7 was provided.
Author
Author
|
After investigating in the test cases, found following:
impl<T: ?Sized> UnwindSafe for Mutex<T> {}Do we want to count the cyclomatic complexity of the above code as 2? Investigating further problems with Cognitive, NOM, and MI. cc @marco-c @marco-ballario |
Author
|
After checking through the rest of the metrics, I'm 99% certain that the previous metrics were giving a lot of false positives, and that's why most of them have an error margin of ~1-2%. This PR otherwise seems ready to me for merging. |
BrainBuzzer
marked this pull request as ready for review
April 15, 2022 14:33
|
I was curious if there was any movement on this pull request? It looks like the main tree-sitter-java grammar was just updated to 0.20.0. |
Collaborator
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.
Updated all dependencies to use tree-sitter v0.20. This PR includes:
Commenttype toLineCommentandBlockCommentThere are some issues with tests for the rust repository. It seems that unlike the previous version where functions in macros were detected and counted towards metrics are not detected anymore due to changes in how the tree-sitter parses code. The following metrics are broken depending on macros used in rust code:
Note - Python is using the GitHub repo's master branch because v0.19.1 from crates.io for
tree-sitter-pythonwas not up to date and was producing more errors than expected. It might be a good idea to fork and tag the repo to the latest commit.