Skip to content

Commit 3b17207

Browse files
authored
Merge pull request #226 from github/mbaluda/updateql2.10.5
Upgrade github/codeql dependency to 2.10.5
2 parents 07a3b16 + bc0e02d commit 3b17207

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+72
-69
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

c/cert/src/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

c/cert/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ suites: codeql-suites
55
license: MIT
66
dependencies:
77
codeql/common-c-coding-standards: '*'
8-
codeql/cpp-all: 0.2.3
8+
codeql/cpp-all: 0.3.5

c/cert/test/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

c/common/src/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

c/common/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ version: 2.15.0-dev
33
license: MIT
44
dependencies:
55
codeql/common-cpp-coding-standards: '*'
6-
codeql/cpp-all: 0.2.3
6+
codeql/cpp-all: 0.3.5

c/common/test/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

c/misra/src/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

c/misra/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ suites: codeql-suites
55
license: MIT
66
dependencies:
77
codeql/common-c-coding-standards: '*'
8-
codeql/cpp-all: 0.2.3
8+
codeql/cpp-all: 0.3.5

c/misra/src/rules/RULE-8-4/CompatibleDeclarationObjectDefined.ql

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,10 @@ where
2323
not isExcluded(decl1, Declarations4Package::compatibleDeclarationObjectDefinedQuery()) and
2424
decl1.isDefinition() and
2525
decl1.getDeclaration() instanceof ExternalIdentifiers and
26-
(
27-
//no declaration matches exactly
28-
not exists(VariableDeclarationEntry decl2 |
29-
not decl2.isDefinition() and decl2.getDeclaration() = decl1.getDeclaration()
30-
) and
31-
//and none is close enough
32-
not exists(VariableDeclarationEntry decl2 |
33-
not decl2.isDefinition() and
34-
decl1.getVariable().getQualifiedName() = decl2.getVariable().getQualifiedName() and
35-
typesCompatible(decl1.getType(), decl2.getType())
36-
)
26+
// no declaration matches
27+
not exists(VariableDeclarationEntry decl2 |
28+
not decl2.isDefinition() and
29+
decl1.getDeclaration() = decl2.getDeclaration() and
30+
typesCompatible(decl1.getType(), decl2.getType())
3731
)
3832
select decl1, "No separate compatible declaration found for this definition."

c/misra/test/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

c/misra/test/rules/RULE-8-4/object1.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
extern int i;
2-
i = 0; // COMPLIANT
2+
int i = 0; // COMPLIANT
33

44
extern int i1 = 0; // NON_COMPLIANT
55

66
int i2 = 0; // NON_COMPLIANT
77

8-
extern int i3; // NON_COMPLIANT
8+
extern int i3;
99

10-
extern int i4; // COMPLIANT
10+
extern int i4;

c/misra/test/rules/RULE-8-4/object2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
short i3 = 0; // NON_COMPLIANT
22

3-
signed int i4 = 0; // COMPLIANT
3+
signed int i4 = 0; // COMPLIANT

c/misra/test/rules/RULE-8-4/test.c

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Lines changed: 6 additions & 0 deletions

codeql_modules/codeql

Lines changed: 0 additions & 1 deletion
This file was deleted.

cpp/autosar/src/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

cpp/autosar/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ suites: codeql-suites
55
license: MIT
66
dependencies:
77
codeql/common-cpp-coding-standards: '*'
8-
codeql/cpp-all: 0.2.3
8+
codeql/cpp-all: 0.3.5

cpp/autosar/test/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
| test1a.cpp:13:13:13:14 | f1 | Static function $@ reuses identifier of $@ | test1a.cpp:13:13:13:14 | f1 | f1 | test1b.cpp:6:13:6:14 | f1 | f1 |
2+
| test1b.cpp:6:13:6:14 | f1 | Static function $@ reuses identifier of $@ | test1b.cpp:6:13:6:14 | f1 | f1 | test1a.cpp:13:13:13:14 | f1 | f1 |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
| test1a.cpp:2:12:2:13 | v1 | Non-member static object $@ reuses identifier name of non-member static object $@ | test1a.cpp:2:12:2:13 | v1 | v1 | test1b.cpp:2:12:2:13 | v1 | v1 |
2+
| test1b.cpp:2:12:2:13 | v1 | Non-member static object $@ reuses identifier name of non-member static object $@ | test1b.cpp:2:12:2:13 | v1 | v1 | test1a.cpp:2:12:2:13 | v1 | v1 |

cpp/autosar/test/rules/A2-10-4/test1b.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ static int v1 = 3; // NON_COMPLIANT
33
} // namespace ns1
44

55
namespace ns3 {
6-
static void f1() {} // NON_COMPLIANT - Not accepted by Clang linker and
7-
// therefore not alerted upon.
6+
static void f1() {} // NON_COMPLIANT - Not accepted by Clang linker
87
void f2() {} // COMPLIANT - Not accepted by Clang linker
9-
} // namespace ns3
8+
} // namespace ns3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
| test1a.cpp:6:12:6:13 | g3 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:6:12:6:13 | g3 | g3 | test1b.cpp:7:12:7:13 | g3 | g3 |
2-
| test1a.cpp:17:43:17:43 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:17:43:17:43 | number_two | number_two | test1b.cpp:12:43:12:43 | number_two | number_two |
3-
| test1b.cpp:7:12:7:13 | g3 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:7:12:7:13 | g3 | g3 | test1a.cpp:6:12:6:13 | g3 | g3 |
4-
| test1b.cpp:12:43:12:43 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:12:43:12:43 | number_two | number_two | test1a.cpp:17:43:17:43 | number_two | number_two |
1+
| test1a.cpp:2:12:2:13 | g1 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:2:12:2:13 | g1 | g1 | test1b.cpp:2:12:2:13 | g1 | g1 |
2+
| test1a.cpp:6:12:6:13 | g3 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:6:12:6:13 | g3 | g3 | test1b.cpp:6:12:6:13 | g3 | g3 |
3+
| test1a.cpp:17:43:17:43 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1a.cpp:17:43:17:43 | number_two | number_two | test1b.cpp:11:43:11:43 | number_two | number_two |
4+
| test1b.cpp:2:12:2:13 | g1 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:2:12:2:13 | g1 | g1 | test1a.cpp:2:12:2:13 | g1 | g1 |
5+
| test1b.cpp:6:12:6:13 | g3 | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:6:12:6:13 | g3 | g3 | test1a.cpp:6:12:6:13 | g3 | g3 |
6+
| test1b.cpp:11:43:11:43 | number_two | Identifier name of non-member object $@ reuses the identifier name of non-member object $@. | test1b.cpp:11:43:11:43 | number_two | number_two | test1a.cpp:17:43:17:43 | number_two | number_two |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| test1a.cpp:7:13:7:14 | f1 | Identifier name of static function $@ reuses identifier name of static function $@ | test1a.cpp:7:13:7:14 | f1 | f1 | test1b.cpp:10:13:10:14 | f1 | f1 |
2-
| test1b.cpp:10:13:10:14 | f1 | Identifier name of static function $@ reuses identifier name of static function $@ | test1b.cpp:10:13:10:14 | f1 | f1 | test1a.cpp:7:13:7:14 | f1 | f1 |
1+
| test1a.cpp:7:13:7:14 | f1 | Identifier name of static function $@ reuses identifier name of static function $@ | test1a.cpp:7:13:7:14 | f1 | f1 | test1b.cpp:9:13:9:14 | f1 | f1 |
2+
| test1b.cpp:9:13:9:14 | f1 | Identifier name of static function $@ reuses identifier name of static function $@ | test1b.cpp:9:13:9:14 | f1 | f1 | test1a.cpp:7:13:7:14 | f1 | f1 |

cpp/autosar/test/rules/A2-10-5/test1a.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
namespace n1 {
2-
static int g1 = 0;
2+
static int g1 = 0; // NON_COMPLIANT
33
}
44

55
static int g2; // COMPLIANT

cpp/autosar/test/rules/A2-10-5/test1b.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
namespace n1 {
2-
static int g1 = 1; // NON_COMPLIANT[FALSE_NEGATIVE], considered the same as
3-
// n1::g1 in test1a.cpp.
2+
static int g1 = 1; // NON_COMPLIANT
43
}
54

65
namespace n2 {

cpp/cert/src/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

cpp/cert/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ description: CERT C++ 2016
44
suites: codeql-suites
55
license: MIT
66
dependencies:
7-
codeql/cpp-all: 0.2.3
7+
codeql/cpp-all: 0.3.5
88
codeql/common-cpp-coding-standards: '*'

cpp/cert/test/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

cpp/common/src/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

cpp/common/src/codingstandards/cpp/Config.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ import codingstandards.cpp.exclusions.RuleMetadata
88
import codingstandards.cpp.deviations.Deviations
99

1010
/** A `coding-standards.xml` configuration file (usually generated from an YAML configuration file). */
11-
class CodingStandardsFile extends XMLFile {
11+
class CodingStandardsFile extends XmlFile {
1212
CodingStandardsFile() {
1313
this.getBaseName() = "coding-standards.xml" and
1414
// Must be within the users source code.
1515
exists(this.getRelativePath())
1616
}
1717
}
1818

19-
class CodingStandardsConfigSection extends XMLElement {
19+
class CodingStandardsConfigSection extends XmlElement {
2020
CodingStandardsConfigSection() { getParent() instanceof CodingStandardsConfig }
2121
}
2222

2323
/** A "Coding Standards" configuration file */
24-
class CodingStandardsConfig extends XMLElement {
24+
class CodingStandardsConfig extends XmlElement {
2525
CodingStandardsConfig() {
2626
any(CodingStandardsFile csf).getARootElement() = this and
2727
this.getName() = "codingstandards"

cpp/common/src/codingstandards/cpp/deviations/Deviations.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ predicate applyDeviationsAtQueryLevel() {
1717
}
1818

1919
/** An element which tells the analysis whether to report deviated results. */
20-
class CodingStandardsReportDeviatedAlerts extends XMLElement {
20+
class CodingStandardsReportDeviatedAlerts extends XmlElement {
2121
CodingStandardsReportDeviatedAlerts() {
2222
getParent() instanceof CodingStandardsConfig and
2323
hasName("report-deviated-alerts")
@@ -35,7 +35,7 @@ class DeviationPermits extends CodingStandardsConfigSection {
3535
}
3636

3737
/** A deviation permit record, that is specified by a permit identifier */
38-
class DeviationPermit extends XMLElement {
38+
class DeviationPermit extends XmlElement {
3939
DeviationPermit() {
4040
getParent() instanceof DeviationPermits and
4141
hasName("deviation-permits-entry")
@@ -118,7 +118,7 @@ class DeviationPermit extends XMLElement {
118118
}
119119

120120
/** A deviation record, that is a specified rule or query */
121-
class DeviationRecord extends XMLElement {
121+
class DeviationRecord extends XmlElement {
122122
DeviationRecord() {
123123
getParent() instanceof DeviationRecords and
124124
hasName("deviations-entry")
@@ -134,13 +134,13 @@ class DeviationRecord extends XMLElement {
134134

135135
private string getRawPermitId() { result = getAChild("permit-id").getTextValue() }
136136

137-
private XMLElement getRawRaisedBy() { result = getAChild("raised-by") }
137+
private XmlElement getRawRaisedBy() { result = getAChild("raised-by") }
138138

139139
private string getRawRaisedByName() { result = getRawRaisedBy().getAChild("name").getTextValue() }
140140

141141
private string getRawRaisedByDate() { result = getRawRaisedBy().getAChild("date").getTextValue() }
142142

143-
private XMLElement getRawApprovedBy() { result = getAChild("approved-by") }
143+
private XmlElement getRawApprovedBy() { result = getAChild("approved-by") }
144144

145145
private string getRawApprovedByName() {
146146
result = getRawApprovedBy().getAChild("name").getTextValue()

cpp/common/src/codingstandards/cpp/guideline_recategorizations/GuidelineRecategorizations.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class GuidelineRecategorizations extends CodingStandardsConfigSection {
1212
GuidelineRecategorizations() { hasName("guideline-recategorizations") }
1313
}
1414

15-
class GuidelineRecategorization extends XMLElement {
15+
class GuidelineRecategorization extends XmlElement {
1616
GuidelineRecategorization() {
1717
getParent() instanceof GuidelineRecategorizations and
1818
hasName("guideline-recategorizations-entry")

cpp/common/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ name: codeql/common-cpp-coding-standards
22
version: 2.15.0-dev
33
license: MIT
44
dependencies:
5-
codeql/cpp-all: 0.2.3
5+
codeql/cpp-all: 0.3.5

cpp/common/test/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

cpp/misra/src/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

cpp/misra/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ suites: codeql-suites
55
license: MIT
66
dependencies:
77
codeql/common-cpp-coding-standards: '*'
8-
codeql/cpp-all: 0.2.3
8+
codeql/cpp-all: 0.3.5

cpp/misra/test/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

cpp/report/src/codeql-pack.lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

cpp/report/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ name: codeql/report-cpp-coding-standards
22
version: 2.15.0-dev
33
license: MIT
44
dependencies:
5-
codeql/cpp-all: 0.2.3
5+
codeql/cpp-all: 0.3.5
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
dependencies:
33
codeql/cpp-all:
4-
version: 0.2.3
4+
version: 0.3.5
55
compiled: false
66
lockVersion: 1.0.0

scripts/generate_modules/queries/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ name: codeql/standard-library-extraction-cpp-coding-standards
22
version: 0.0.0
33
license: MIT
44
dependencies:
5-
codeql/cpp-all: 0.2.3
5+
codeql/cpp-all: 0.3.5

supported_codeql_configs.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"supported_environment": [
33
{
4-
"codeql_cli": "2.9.4",
5-
"codeql_standard_library": "codeql-cli/v2.9.4",
6-
"codeql_cli_bundle": "codeql-bundle-20220615"
4+
"codeql_cli": "2.10.5",
5+
"codeql_standard_library": "codeql-cli/v2.10.5",
6+
"codeql_cli_bundle": "codeql-bundle-20220908"
77
}
88
],
99
"supported_language" : [
@@ -14,4 +14,4 @@
1414
"language" : "c"
1515
}
1616
]
17-
}
17+
}

0 commit comments

Comments
 (0)