-
Notifications
You must be signed in to change notification settings - Fork 68
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
Description
Affected rules
A2-7-3
Description
Function scope declarations are, by nature, limited in scope to the single function they are declared in. We should ignore such declarations for the purpose of this rule because it typically flags a large number of declarations developers are not inclined to document.
We believe this is justified by the spirit of the rule because such function-local declarations are limited in scope. This is interpretation is supported by JSF rule AV129, on which this rule is based, which states "Comments in header files should describe the externally visible behavior of the functions or classes being documented." Declarations inside a function are not "externally visible".
Example
void f() {
class ClassA { // COMPLIANT
};
}
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
Projects
Status
Done