-
Notifications
You must be signed in to change notification settings - Fork 68
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
Description
Affected rules
A16-2-2
Description
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
#include "a.h"
#include "lib.h" // Seen as useless
void test() {
f();
g();
}
a.h
#include "lib.h"
void g() {
f();
}
lib.h
#include "lib_internal.h"
lib_internal.h
void f();
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
Projects
Status
Done