Skip to content

Commit 8f850c3

Browse files
Double check metadata
1 parent c19988a commit 8f850c3

16 files changed

+47
-51
lines changed

cpp/common/src/codingstandards/cpp/exclusions/cpp/Toolchain3.qll

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import RuleMetadata
44
import codingstandards.cpp.exclusions.RuleMetadata
55

66
newtype Toolchain3Query =
7-
TRedeclarationOfStaticConstexprDataMemberAuditQuery() or
7+
TRedeclarationOfStaticConstexprDataMemberQuery() or
88
TImplicitDeclarationOfCopyConstructorQuery() or
99
TImplicitDeclarationOfCopyConstructorAuditQuery() or
10-
TNoexceptSpecifierThrowAuditQuery() or
10+
TNoexceptSpecifierThrowQuery() or
1111
TUseOfDeprecatedCHeadersQuery() or
1212
TUseOfDeprecatedStrStreamClassQuery() or
1313
TUseOfUncaughtExceptionQuery() or
14-
TUseOfDeprecatedFunctionBinderTypedefMemberAuditQuery() or
14+
TUseOfDeprecatedFunctionBinderTypedefMemberQuery() or
1515
TUseOfDeprecatedUnaryOrBinaryNegateQuery() or
1616
TUseOfDeprecatedAllocatorVoidQuery() or
1717
TUseOfDeprecatedStdAllocatorMemberQuery() or
@@ -23,11 +23,11 @@ newtype Toolchain3Query =
2323

2424
predicate isToolchain3QueryMetadata(Query query, string queryId, string ruleId, string category) {
2525
query =
26-
// `Query` instance for the `redeclarationOfStaticConstexprDataMemberAudit` query
27-
Toolchain3Package::redeclarationOfStaticConstexprDataMemberAuditQuery() and
26+
// `Query` instance for the `redeclarationOfStaticConstexprDataMember` query
27+
Toolchain3Package::redeclarationOfStaticConstexprDataMemberQuery() and
2828
queryId =
29-
// `@id` for the `redeclarationOfStaticConstexprDataMemberAudit` query
30-
"cpp/misra/redeclaration-of-static-constexpr-data-member-audit" and
29+
// `@id` for the `redeclarationOfStaticConstexprDataMember` query
30+
"cpp/misra/redeclaration-of-static-constexpr-data-member" and
3131
ruleId = "RULE-4-1-2" and
3232
category = "advisory"
3333
or
@@ -50,11 +50,11 @@ predicate isToolchain3QueryMetadata(Query query, string queryId, string ruleId,
5050
category = "advisory"
5151
or
5252
query =
53-
// `Query` instance for the `noexceptSpecifierThrowAudit` query
54-
Toolchain3Package::noexceptSpecifierThrowAuditQuery() and
53+
// `Query` instance for the `noexceptSpecifierThrow` query
54+
Toolchain3Package::noexceptSpecifierThrowQuery() and
5555
queryId =
56-
// `@id` for the `noexceptSpecifierThrowAudit` query
57-
"cpp/misra/noexcept-specifier-throw-audit" and
56+
// `@id` for the `noexceptSpecifierThrow` query
57+
"cpp/misra/noexcept-specifier-throw" and
5858
ruleId = "RULE-4-1-2" and
5959
category = "advisory"
6060
or
@@ -86,11 +86,11 @@ predicate isToolchain3QueryMetadata(Query query, string queryId, string ruleId,
8686
category = "advisory"
8787
or
8888
query =
89-
// `Query` instance for the `useOfDeprecatedFunctionBinderTypedefMemberAudit` query
90-
Toolchain3Package::useOfDeprecatedFunctionBinderTypedefMemberAuditQuery() and
89+
// `Query` instance for the `useOfDeprecatedFunctionBinderTypedefMember` query
90+
Toolchain3Package::useOfDeprecatedFunctionBinderTypedefMemberQuery() and
9191
queryId =
92-
// `@id` for the `useOfDeprecatedFunctionBinderTypedefMemberAudit` query
93-
"cpp/misra/use-of-deprecated-function-binder-typedef-member-audit" and
92+
// `@id` for the `useOfDeprecatedFunctionBinderTypedefMember` query
93+
"cpp/misra/use-of-deprecated-function-binder-typedef-member" and
9494
ruleId = "RULE-4-1-2" and
9595
category = "advisory"
9696
or
@@ -168,11 +168,11 @@ predicate isToolchain3QueryMetadata(Query query, string queryId, string ruleId,
168168
}
169169

170170
module Toolchain3Package {
171-
Query redeclarationOfStaticConstexprDataMemberAuditQuery() {
171+
Query redeclarationOfStaticConstexprDataMemberQuery() {
172172
//autogenerate `Query` type
173173
result =
174-
// `Query` type for `redeclarationOfStaticConstexprDataMemberAudit` query
175-
TQueryCPP(TToolchain3PackageQuery(TRedeclarationOfStaticConstexprDataMemberAuditQuery()))
174+
// `Query` type for `redeclarationOfStaticConstexprDataMember` query
175+
TQueryCPP(TToolchain3PackageQuery(TRedeclarationOfStaticConstexprDataMemberQuery()))
176176
}
177177

178178
Query implicitDeclarationOfCopyConstructorQuery() {
@@ -189,11 +189,11 @@ module Toolchain3Package {
189189
TQueryCPP(TToolchain3PackageQuery(TImplicitDeclarationOfCopyConstructorAuditQuery()))
190190
}
191191

192-
Query noexceptSpecifierThrowAuditQuery() {
192+
Query noexceptSpecifierThrowQuery() {
193193
//autogenerate `Query` type
194194
result =
195-
// `Query` type for `noexceptSpecifierThrowAudit` query
196-
TQueryCPP(TToolchain3PackageQuery(TNoexceptSpecifierThrowAuditQuery()))
195+
// `Query` type for `noexceptSpecifierThrow` query
196+
TQueryCPP(TToolchain3PackageQuery(TNoexceptSpecifierThrowQuery()))
197197
}
198198

199199
Query useOfDeprecatedCHeadersQuery() {
@@ -217,11 +217,11 @@ module Toolchain3Package {
217217
TQueryCPP(TToolchain3PackageQuery(TUseOfUncaughtExceptionQuery()))
218218
}
219219

220-
Query useOfDeprecatedFunctionBinderTypedefMemberAuditQuery() {
220+
Query useOfDeprecatedFunctionBinderTypedefMemberQuery() {
221221
//autogenerate `Query` type
222222
result =
223-
// `Query` type for `useOfDeprecatedFunctionBinderTypedefMemberAudit` query
224-
TQueryCPP(TToolchain3PackageQuery(TUseOfDeprecatedFunctionBinderTypedefMemberAuditQuery()))
223+
// `Query` type for `useOfDeprecatedFunctionBinderTypedefMember` query
224+
TQueryCPP(TToolchain3PackageQuery(TUseOfDeprecatedFunctionBinderTypedefMemberQuery()))
225225
}
226226

227227
Query useOfDeprecatedUnaryOrBinaryNegateQuery() {

cpp/misra/src/rules/RULE-4-1-2/ImplicitDeclarationOfCopyConstructor.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import codingstandards.cpp.types.ImplicitSpecialMemberFunctions
2222

2323
from Class c, string specialMemberName
2424
where
25-
not isExcluded(c, Toolchain3Package::implicitDeclarationOfCopyConstructorAuditQuery()) and
25+
not isExcluded(c, Toolchain3Package::implicitDeclarationOfCopyConstructorQuery()) and
2626
(
2727
c instanceof MustHaveDeprecatedCopyConstructor and
2828
specialMemberName = "copy constructor"

cpp/misra/src/rules/RULE-4-1-2/NoexceptSpecifierThrowAudit.ql renamed to cpp/misra/src/rules/RULE-4-1-2/NoexceptSpecifierThrow.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
2-
* @id cpp/misra/noexcept-specifier-throw-audit
2+
* @id cpp/misra/noexcept-specifier-throw
33
* @name RULE-4-1-2: The noexcept specifier throw() is a deprecated language feature should not be used
44
* @description Deprecated language features such as the noexcept specifier throw() are only
55
* supported for backwards compatibility; these are considered bad practice, or have
66
* been superceded by better alternatives.
77
* @kind problem
8-
* @precision low
8+
* @precision high
99
* @problem.severity warning
1010
* @tags external/misra/id/rule-4-1-2
1111
* scope/single-translation-unit
@@ -20,7 +20,7 @@ import codingstandards.cpp.misra
2020

2121
from Function f
2222
where
23-
not isExcluded(f, Toolchain3Package::noexceptSpecifierThrowAuditQuery()) and
23+
not isExcluded(f, Toolchain3Package::noexceptSpecifierThrowQuery()) and
2424
f.isNoThrow() and
2525
not f.isCompilerGenerated()
2626
select f,

cpp/misra/src/rules/RULE-4-1-2/RedeclarationOfStaticConstexprDataMemberAudit.ql renamed to cpp/misra/src/rules/RULE-4-1-2/RedeclarationOfStaticConstexprDataMember.ql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
/**
2-
* @id cpp/misra/redeclaration-of-static-constexpr-data-member-audit
2+
* @id cpp/misra/redeclaration-of-static-constexpr-data-member
33
* @name RULE-4-1-2: Redeclaration of static constexpr data members is a deprecated language feature should not be used
44
* @description Deprecated language features such as redeclaration of static constexpr data members
55
* are only supported for backwards compatibility; these are considered bad practice,
66
* or have been superceded by better alternatives.
77
* @kind problem
8-
* @precision low
8+
* @precision high
99
* @problem.severity warning
1010
* @tags external/misra/id/rule-4-1-2
1111
* scope/single-translation-unit
1212
* maintainability
13-
* audit
1413
* external/misra/enforcement/decidable
1514
* external/misra/obligation/advisory
1615
*/
@@ -20,7 +19,7 @@ import codingstandards.cpp.misra
2019

2120
from Variable v, Initializer i
2221
where
23-
not isExcluded(v, Toolchain3Package::redeclarationOfStaticConstexprDataMemberAuditQuery()) and
22+
not isExcluded(v, Toolchain3Package::redeclarationOfStaticConstexprDataMemberQuery()) and
2423
v.isStatic() and
2524
i.getDeclaration() = v and
2625
v.isConstexpr() and

cpp/misra/src/rules/RULE-4-1-2/UseOfDeprecatedFunctionBinderTypedefMemberAudit.ql renamed to cpp/misra/src/rules/RULE-4-1-2/UseOfDeprecatedFunctionBinderTypedefMember.ql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
/**
2-
* @id cpp/misra/use-of-deprecated-function-binder-typedef-member-audit
2+
* @id cpp/misra/use-of-deprecated-function-binder-typedef-member
33
* @name RULE-4-1-2: Certain members of function binder typedefs are deprecated language features and should not be used
44
* @description Deprecated language features such as certain function binder typedef members are
55
* only supported for backwards compatibility; these are considered bad practice, or
66
* have been superceded by better alternatives.
77
* @kind problem
8-
* @precision low
8+
* @precision high
99
* @problem.severity warning
1010
* @tags external/misra/id/rule-4-1-2
1111
* scope/single-translation-unit
1212
* maintainability
13-
* audit
1413
* external/misra/enforcement/decidable
1514
* external/misra/obligation/advisory
1615
*/
@@ -70,6 +69,6 @@ class DeprecatedFunctionBinderTypedefMember extends UsingAliasTypedefType {
7069

7170
from TypeMention tm, DeprecatedFunctionBinderTypedefMember member
7271
where
73-
not isExcluded(tm, Toolchain3Package::useOfDeprecatedFunctionBinderTypedefMemberAuditQuery()) and
72+
not isExcluded(tm, Toolchain3Package::useOfDeprecatedFunctionBinderTypedefMemberQuery()) and
7473
tm.getMentionedType() = member
7574
select tm, "Use of deprecated function binder typedef member " + member.toString()

cpp/misra/src/rules/RULE-4-1-2/UseOfDeprecatedStdAllocatorMember.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* supported for backwards compatibility; these are considered bad practice, or have
66
* been superceded by better alternatives.
77
* @kind problem
8-
* @precision very_high
8+
* @precision very-high
99
* @problem.severity warning
1010
* @tags external/misra/id/rule-4-1-2
1111
* scope/single-translation-unit

cpp/misra/test/rules/RULE-4-1-2/NoexceptSpecifierThrowAudit.expected renamed to cpp/misra/test/rules/RULE-4-1-2/NoexceptSpecifierThrow.expected

File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rules/RULE-4-1-2/NoexceptSpecifierThrow.ql

cpp/misra/test/rules/RULE-4-1-2/NoexceptSpecifierThrowAudit.qlref

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

cpp/misra/test/rules/RULE-4-1-2/RedeclarationOfStaticConstexprDataMemberAudit.expected renamed to cpp/misra/test/rules/RULE-4-1-2/RedeclarationOfStaticConstexprDataMember.expected

File renamed without changes.

0 commit comments

Comments
 (0)