-
Notifications
You must be signed in to change notification settings - Fork 75
A16-2-2: Consider excluding redundant includes #453
Copy link
Copy link
Closed
Labels
Difficulty-HighA false positive or false negative report which is expected to take 1+ week effort to addressA false positive or false negative report which is expected to take 1+ week 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-HighA false positive or false negative report which is expected to take 1+ week effort to addressA false positive or false negative report which is expected to take 1+ week 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
A16-2-2Description
The query currently reports redundant includes - e.g. includes which provide used symbols which are provided by earlier includes. I don't believe redundant includes are intended to be flagged by this rule per the justification.
Note: this doesn't occur if a declaration is used in the directly included file. In that case we assume the redundancy is intended. However, if a library is structured so that the public header forwards to an internal header, we can get "spurious" redundancy results.
Example
source.c
a.h
lib.h
lib_internal.h