-
Notifications
You must be signed in to change notification settings - Fork 75
M7-3-6: Refine detection of using within function/class scope #400
Copy link
Copy link
Closed
Labels
Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Metadata
Metadata
Assignees
Labels
Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
Affected rules
M7-3-6Description
The rule states:
However, we currently permit both using declarations and using directives in function/class scope - we should refine this.
In addition, some
usingdirectives/declarations appear to be "orphaned" in our model - i.e. be located within a function or class, but with a fake parent which is not otherwise connected to the AST. We should exclude these to avoid false positives.Example