-
Notifications
You must be signed in to change notification settings - Fork 97
SONARPY-394 Migrate FieldNameCheck to strongly typed AST #360
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
Conversation
1a59f54
to
80bcbd3
Compare
import org.sonar.python.parser.PythonParser; | ||
import org.sonar.python.tree.PythonTreeMaker; | ||
|
||
public class SemanticTest { |
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.
This is factorization by inheritance, I would rather make this a utility class with a static method.
} | ||
}); | ||
scopesByRootTree.values().stream() | ||
.filter(scope -> scope.rootTree instanceof PyClassDefTree) |
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.
Why not use of .is(Tree.Kind.CLASSDEF) ?
'project:twisted-12.1.0/twisted/internet/task.py':[ | ||
63, | ||
64, | ||
112, |
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.
I don't understand why this issue is missing and not relevant anymore : this is an instance field and should be detected as such.
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.
And I figured it out : this self variable is instantiated via a class method. This is way out of scope of this sprint, so fine to accept this "loss" for now.
…es analysis (#360) GitOrigin-RevId: 673c28b6ac4ed5db19430d57872a5a02fec1b594
No description provided.