From f5b5c69d825994a4b29d5f294e4d997e7cda23d6 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Fri, 9 Oct 2026 15:43:26 +0100 Subject: [PATCH 1/6] C++: Freeze the quality part of the existing cpp-security-and-quality.qls suite. --- .../cpp-security-and-quality.qls | 89 ++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/cpp/ql/src/codeql-suites/cpp-security-and-quality.qls b/cpp/ql/src/codeql-suites/cpp-security-and-quality.qls index b4f85c4e306e..d6df483208da 100644 --- a/cpp/ql/src/codeql-suites/cpp-security-and-quality.qls +++ b/cpp/ql/src/codeql-suites/cpp-security-and-quality.qls @@ -1,5 +1,92 @@ - description: Security-and-quality queries for C and C++ - queries: . -- apply: security-and-quality-selectors.yml +- apply: security-and-frozen-quality-selectors.yml from: codeql/suite-helpers +- include: + id: + - cpp/ambiguous-assignment-of-comparison + - cpp/ambiguously-signed-bit-field + - cpp/array-arg-size-mismatch + - cpp/array-in-interface + - cpp/assign-where-compare-meant + - cpp/assignment-does-not-return-this + - cpp/bitwise-sign-check + - cpp/catch-by-value + - cpp/catch-missing-free + - cpp/commented-out-code + - cpp/compare-where-assign-meant + - cpp/comparison-of-identical-expressions + - cpp/comparison-precedence + - cpp/complex-block + - cpp/complex-condition + - cpp/constant-comparison + - cpp/constructor-delegation + - cpp/continue-in-false-loop + - cpp/dead-code-goto + - cpp/declaration-hides-parameter + - cpp/declaration-hides-variable + - cpp/dubious-null-check + - cpp/duplicate-include-guard + - cpp/empty-block + - cpp/empty-if + - cpp/equality-on-floats + - cpp/fixme-comment + - cpp/function-in-block + - cpp/futile-params + - cpp/guarded-free + - cpp/implicit-bitfield-downcast + - cpp/implicit-function-declaration + - cpp/include-non-header + - cpp/incomplete-parity-check + - cpp/inconsistent-call-on-result + - cpp/inconsistent-loop-direction + - cpp/inconsistent-null-check + - cpp/inconsistent-virtual-inheritance + - cpp/integer-used-for-enum + - cpp/irregular-enum-init + - cpp/large-parameter + - cpp/leap-year/adding-365-days-per-year + - cpp/leap-year/unchecked-after-arithmetic-year-modification + - cpp/leap-year/unchecked-return-value-for-time-conversion-function + - cpp/local-variable-hides-global-variable + - cpp/logical-operator-applied-to-flag + - cpp/long-switch + - cpp/loop-variable-changed + - cpp/loop-variable-float + - cpp/lossy-function-result-cast + - cpp/lossy-pointer-cast + - cpp/member-const-no-effect + - cpp/missing-case-in-switch + - cpp/missing-header-guard + - cpp/missing-return + - cpp/mistyped-function-arguments + - cpp/nested-loops-with-same-variable + - cpp/new-array-delete-mismatch + - cpp/new-delete-array-mismatch + - cpp/non-member-const-no-effect + - cpp/poorly-documented-function + - cpp/redefined-default-parameter + - cpp/resource-not-released-in-destructor + - cpp/rethrow-no-exception + - cpp/return-c-str-of-std-string + - cpp/rule-of-two + - cpp/short-global-name + - cpp/sizeof-side-effect + - cpp/slicing + - cpp/stack-address-escape + - cpp/string-copy-return-value-as-boolean + - cpp/throw-in-destructor + - cpp/throwing-pointer + - cpp/too-many-format-arguments + - cpp/trivial-switch + - cpp/undisciplined-multiple-inheritance + - cpp/unsigned-comparison-zero + - cpp/unused-local-variable + - cpp/unused-static-function + - cpp/unused-static-variable + - cpp/use-in-own-initializer + - cpp/use-of-goto + - cpp/useless-expression + - cpp/virtual-call-in-constructor + - cpp/virtual-destructor - apply: codeql-suites/exclude-slow-queries.yml From 74b382030ba6cae7235910a882062964f2a0baaa Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Fri, 9 Oct 2026 16:20:36 +0100 Subject: [PATCH 2/6] C++: Tag the new quality queries. --- cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql | 3 ++- cpp/ql/src/Best Practices/ComplexCondition.ql | 3 ++- cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql | 3 ++- cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql | 3 ++- cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql | 3 ++- cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql | 3 ++- cpp/ql/src/Best Practices/GuardedFree.ql | 3 ++- cpp/ql/src/Best Practices/Hiding/DeclarationHidesParameter.ql | 3 ++- cpp/ql/src/Best Practices/Hiding/DeclarationHidesVariable.ql | 3 ++- cpp/ql/src/Best Practices/Likely Errors/Slicing.ql | 3 ++- cpp/ql/src/Best Practices/RuleOfTwo.ql | 3 ++- cpp/ql/src/Best Practices/UseOfGoto.ql | 3 ++- cpp/ql/src/Critical/LargeParameter.ql | 3 ++- cpp/ql/src/Critical/NewArrayDeleteMismatch.ql | 3 ++- cpp/ql/src/Critical/NewDeleteArrayMismatch.ql | 3 ++- cpp/ql/src/Documentation/FixmeComments.ql | 3 ++- cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql | 3 ++- cpp/ql/src/Likely Bugs/Arithmetic/BitwiseSignCheck.ql | 3 ++- cpp/ql/src/Likely Bugs/Arithmetic/ComparisonPrecedence.ql | 3 ++- cpp/ql/src/Likely Bugs/Arithmetic/FloatComparison.ql | 3 ++- cpp/ql/src/Likely Bugs/Arithmetic/PointlessComparison.ql | 3 ++- cpp/ql/src/Likely Bugs/Arithmetic/PointlessSelfComparison.ql | 3 ++- cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql | 3 ++- cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql | 3 ++- cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql | 3 ++- .../src/Likely Bugs/Conversion/ImplicitDowncastFromBitfield.ql | 3 ++- cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql | 3 ++- cpp/ql/src/Likely Bugs/Likely Typos/AssignWhereCompareMeant.ql | 3 ++- cpp/ql/src/Likely Bugs/Likely Typos/CompareWhereAssignMeant.ql | 3 ++- cpp/ql/src/Likely Bugs/Likely Typos/DubiousNullCheck.ql | 3 ++- cpp/ql/src/Likely Bugs/Likely Typos/FutileConditional.ql | 3 ++- cpp/ql/src/Likely Bugs/Likely Typos/ShortCircuitBitMask.ql | 3 ++- cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql | 3 ++- .../src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql | 3 ++- .../Memory Management/ReturnCstrOfLocalStdString.ql | 3 ++- cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql | 3 ++- cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql | 3 ++- cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql | 3 ++- cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql | 3 ++- .../Underspecified Functions/ImplicitFunctionDeclaration.ql | 3 ++- .../Likely Bugs/Underspecified Functions/TooManyArguments.ql | 3 ++- cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql | 3 ++- cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql | 3 ++- cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql | 3 ++- cpp/ql/src/jsf/4.24 Control Flow Structures/AV Rule 197.ql | 3 ++- 45 files changed, 90 insertions(+), 45 deletions(-) diff --git a/cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql b/cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql index be175660bd9c..b85b04575d37 100644 --- a/cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql +++ b/cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql @@ -5,7 +5,8 @@ * @problem.severity recommendation * @precision high * @id cpp/complex-block - * @tags testability + * @tags quality + * testability * readability * maintainability */ diff --git a/cpp/ql/src/Best Practices/ComplexCondition.ql b/cpp/ql/src/Best Practices/ComplexCondition.ql index 20ecd1b1adeb..944286f1d6b0 100644 --- a/cpp/ql/src/Best Practices/ComplexCondition.ql +++ b/cpp/ql/src/Best Practices/ComplexCondition.ql @@ -5,7 +5,8 @@ * @problem.severity recommendation * @precision high * @id cpp/complex-condition - * @tags testability + * @tags quality + * testability * readability * maintainability * statistical diff --git a/cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql b/cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql index 1e902579a495..c3d39d291e49 100644 --- a/cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql +++ b/cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision high * @id cpp/rethrow-no-exception - * @tags reliability + * @tags quality + * reliability * correctness * exceptions */ diff --git a/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql b/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql index 28e7541fc744..3709c86dcee3 100644 --- a/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql +++ b/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision very-high * @id cpp/catch-by-value - * @tags efficiency + * @tags quality + * efficiency * correctness * exceptions */ diff --git a/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql b/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql index d3848962abda..c572fe2b2102 100644 --- a/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql +++ b/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision high * @id cpp/catch-missing-free - * @tags efficiency + * @tags quality + * efficiency * correctness * exceptions * external/cwe/cwe-401 diff --git a/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql b/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql index 85c21a28f560..07b865d0abf0 100644 --- a/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql +++ b/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision high * @id cpp/throwing-pointer - * @tags efficiency + * @tags quality + * efficiency * correctness * exceptions */ diff --git a/cpp/ql/src/Best Practices/GuardedFree.ql b/cpp/ql/src/Best Practices/GuardedFree.ql index 3afe1a92e954..5d2116f0a7b1 100644 --- a/cpp/ql/src/Best Practices/GuardedFree.ql +++ b/cpp/ql/src/Best Practices/GuardedFree.ql @@ -6,7 +6,8 @@ * @problem.severity recommendation * @precision very-high * @id cpp/guarded-free - * @tags maintainability + * @tags quality + * maintainability * readability */ diff --git a/cpp/ql/src/Best Practices/Hiding/DeclarationHidesParameter.ql b/cpp/ql/src/Best Practices/Hiding/DeclarationHidesParameter.ql index 64e5760ed2b4..b4c0e7854605 100644 --- a/cpp/ql/src/Best Practices/Hiding/DeclarationHidesParameter.ql +++ b/cpp/ql/src/Best Practices/Hiding/DeclarationHidesParameter.ql @@ -5,7 +5,8 @@ * @problem.severity recommendation * @precision very-high * @id cpp/declaration-hides-parameter - * @tags maintainability + * @tags quality + * maintainability * readability */ diff --git a/cpp/ql/src/Best Practices/Hiding/DeclarationHidesVariable.ql b/cpp/ql/src/Best Practices/Hiding/DeclarationHidesVariable.ql index d10d346c5135..b5d40675c823 100644 --- a/cpp/ql/src/Best Practices/Hiding/DeclarationHidesVariable.ql +++ b/cpp/ql/src/Best Practices/Hiding/DeclarationHidesVariable.ql @@ -5,7 +5,8 @@ * @problem.severity recommendation * @precision high * @id cpp/declaration-hides-variable - * @tags maintainability + * @tags quality + * maintainability * readability */ diff --git a/cpp/ql/src/Best Practices/Likely Errors/Slicing.ql b/cpp/ql/src/Best Practices/Likely Errors/Slicing.ql index 52fec3ccbba8..ab9f5a27f0d5 100644 --- a/cpp/ql/src/Best Practices/Likely Errors/Slicing.ql +++ b/cpp/ql/src/Best Practices/Likely Errors/Slicing.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision high * @id cpp/slicing - * @tags reliability + * @tags quality + * reliability * correctness * types */ diff --git a/cpp/ql/src/Best Practices/RuleOfTwo.ql b/cpp/ql/src/Best Practices/RuleOfTwo.ql index efc30c0829ee..030c8a706c33 100644 --- a/cpp/ql/src/Best Practices/RuleOfTwo.ql +++ b/cpp/ql/src/Best Practices/RuleOfTwo.ql @@ -7,7 +7,8 @@ * @problem.severity warning * @precision high * @id cpp/rule-of-two - * @tags reliability + * @tags quality + * reliability * readability * language-features */ diff --git a/cpp/ql/src/Best Practices/UseOfGoto.ql b/cpp/ql/src/Best Practices/UseOfGoto.ql index 26d72d69a0a2..20ddb5176af5 100644 --- a/cpp/ql/src/Best Practices/UseOfGoto.ql +++ b/cpp/ql/src/Best Practices/UseOfGoto.ql @@ -6,7 +6,8 @@ * @problem.severity warning * @precision high * @id cpp/use-of-goto - * @tags maintainability + * @tags quality + * maintainability * readability * language-features */ diff --git a/cpp/ql/src/Critical/LargeParameter.ql b/cpp/ql/src/Critical/LargeParameter.ql index 2df622a4c81c..c94dea2a37b3 100644 --- a/cpp/ql/src/Critical/LargeParameter.ql +++ b/cpp/ql/src/Critical/LargeParameter.ql @@ -5,7 +5,8 @@ * @problem.severity recommendation * @precision very-high * @id cpp/large-parameter - * @tags efficiency + * @tags quality + * efficiency * readability * statistical * non-attributable diff --git a/cpp/ql/src/Critical/NewArrayDeleteMismatch.ql b/cpp/ql/src/Critical/NewArrayDeleteMismatch.ql index c41a8c5ce29c..ac701b58cdad 100644 --- a/cpp/ql/src/Critical/NewArrayDeleteMismatch.ql +++ b/cpp/ql/src/Critical/NewArrayDeleteMismatch.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision high * @id cpp/new-array-delete-mismatch - * @tags reliability + * @tags quality + * reliability */ import NewDelete diff --git a/cpp/ql/src/Critical/NewDeleteArrayMismatch.ql b/cpp/ql/src/Critical/NewDeleteArrayMismatch.ql index 497ddfe19c4a..85484788c535 100644 --- a/cpp/ql/src/Critical/NewDeleteArrayMismatch.ql +++ b/cpp/ql/src/Critical/NewDeleteArrayMismatch.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision high * @id cpp/new-delete-array-mismatch - * @tags reliability + * @tags quality + * reliability */ import NewDelete diff --git a/cpp/ql/src/Documentation/FixmeComments.ql b/cpp/ql/src/Documentation/FixmeComments.ql index 5ccbf1292758..0699e1852279 100644 --- a/cpp/ql/src/Documentation/FixmeComments.ql +++ b/cpp/ql/src/Documentation/FixmeComments.ql @@ -5,7 +5,8 @@ * @problem.severity recommendation * @precision very-high * @id cpp/fixme-comment - * @tags maintainability + * @tags quality + * maintainability * documentation * external/cwe/cwe-546 */ diff --git a/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql b/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql index c06cfeabe0d0..3b2c5060a379 100644 --- a/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql +++ b/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql @@ -5,7 +5,8 @@ * @problem.severity error * @precision high * @id cpp/duplicate-include-guard - * @tags reliability + * @tags quality + * reliability * maintainability * modularity */ diff --git a/cpp/ql/src/Likely Bugs/Arithmetic/BitwiseSignCheck.ql b/cpp/ql/src/Likely Bugs/Arithmetic/BitwiseSignCheck.ql index dd27e4b7aee2..fba2fcf3f022 100644 --- a/cpp/ql/src/Likely Bugs/Arithmetic/BitwiseSignCheck.ql +++ b/cpp/ql/src/Likely Bugs/Arithmetic/BitwiseSignCheck.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision high * @id cpp/bitwise-sign-check - * @tags reliability + * @tags quality + * reliability * correctness */ diff --git a/cpp/ql/src/Likely Bugs/Arithmetic/ComparisonPrecedence.ql b/cpp/ql/src/Likely Bugs/Arithmetic/ComparisonPrecedence.ql index d4b23265eed5..cd893ca705ee 100644 --- a/cpp/ql/src/Likely Bugs/Arithmetic/ComparisonPrecedence.ql +++ b/cpp/ql/src/Likely Bugs/Arithmetic/ComparisonPrecedence.ql @@ -7,7 +7,8 @@ * @problem.severity warning * @precision very-high * @id cpp/comparison-precedence - * @tags maintainability + * @tags quality + * maintainability * readability */ diff --git a/cpp/ql/src/Likely Bugs/Arithmetic/FloatComparison.ql b/cpp/ql/src/Likely Bugs/Arithmetic/FloatComparison.ql index 1f2a7ca506fd..7f1dfad0c6cf 100644 --- a/cpp/ql/src/Likely Bugs/Arithmetic/FloatComparison.ql +++ b/cpp/ql/src/Likely Bugs/Arithmetic/FloatComparison.ql @@ -7,7 +7,8 @@ * @problem.severity recommendation * @precision high * @id cpp/equality-on-floats - * @tags reliability + * @tags quality + * reliability * correctness */ diff --git a/cpp/ql/src/Likely Bugs/Arithmetic/PointlessComparison.ql b/cpp/ql/src/Likely Bugs/Arithmetic/PointlessComparison.ql index 916f664c4fad..7067f76d38fc 100644 --- a/cpp/ql/src/Likely Bugs/Arithmetic/PointlessComparison.ql +++ b/cpp/ql/src/Likely Bugs/Arithmetic/PointlessComparison.ql @@ -8,7 +8,8 @@ * @problem.severity warning * @precision high * @id cpp/constant-comparison - * @tags maintainability + * @tags quality + * maintainability * readability */ diff --git a/cpp/ql/src/Likely Bugs/Arithmetic/PointlessSelfComparison.ql b/cpp/ql/src/Likely Bugs/Arithmetic/PointlessSelfComparison.ql index d2602c5bd28a..1ab9ee67c404 100644 --- a/cpp/ql/src/Likely Bugs/Arithmetic/PointlessSelfComparison.ql +++ b/cpp/ql/src/Likely Bugs/Arithmetic/PointlessSelfComparison.ql @@ -7,7 +7,8 @@ * @problem.severity warning * @precision high * @id cpp/comparison-of-identical-expressions - * @tags readability + * @tags quality + * readability * maintainability */ diff --git a/cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql b/cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql index 7f89569c3ba5..26da97191a9d 100644 --- a/cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql +++ b/cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql @@ -7,7 +7,8 @@ * @problem.severity warning * @precision very-high * @id cpp/unsigned-comparison-zero - * @tags maintainability + * @tags quality + * maintainability * readability */ diff --git a/cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql b/cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql index 5b16fc7cf8f0..bacba3a4fa1e 100644 --- a/cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql +++ b/cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql @@ -7,7 +7,8 @@ * @id cpp/continue-in-false-loop * @problem.severity warning * @precision high - * @tags correctness + * @tags quality + * correctness */ import cpp diff --git a/cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql b/cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql index 924b5d87f90f..e8a08b4fb944 100644 --- a/cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql +++ b/cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql @@ -6,7 +6,8 @@ * @id cpp/array-arg-size-mismatch * @problem.severity warning * @precision high - * @tags reliability + * @tags quality + * reliability */ import cpp diff --git a/cpp/ql/src/Likely Bugs/Conversion/ImplicitDowncastFromBitfield.ql b/cpp/ql/src/Likely Bugs/Conversion/ImplicitDowncastFromBitfield.ql index 237d20c8f628..b3df230bf70a 100644 --- a/cpp/ql/src/Likely Bugs/Conversion/ImplicitDowncastFromBitfield.ql +++ b/cpp/ql/src/Likely Bugs/Conversion/ImplicitDowncastFromBitfield.ql @@ -6,7 +6,8 @@ * @problem.severity warning * @precision high * @id cpp/implicit-bitfield-downcast - * @tags reliability + * @tags quality + * reliability * correctness * types */ diff --git a/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql b/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql index 5b539faa5b4e..5a8fa0b8fa96 100644 --- a/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql +++ b/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql @@ -7,7 +7,8 @@ * @problem.severity recommendation * @precision high * @id cpp/too-many-format-arguments - * @tags reliability + * @tags quality + * reliability * correctness */ diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/AssignWhereCompareMeant.ql b/cpp/ql/src/Likely Bugs/Likely Typos/AssignWhereCompareMeant.ql index 3d2f6830bf54..6e71233672e2 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/AssignWhereCompareMeant.ql +++ b/cpp/ql/src/Likely Bugs/Likely Typos/AssignWhereCompareMeant.ql @@ -6,7 +6,8 @@ * @problem.severity error * @precision high * @id cpp/assign-where-compare-meant - * @tags reliability + * @tags quality + * reliability * correctness * external/cwe/cwe-481 */ diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/CompareWhereAssignMeant.ql b/cpp/ql/src/Likely Bugs/Likely Typos/CompareWhereAssignMeant.ql index 46c271b11d7e..709545af661e 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/CompareWhereAssignMeant.ql +++ b/cpp/ql/src/Likely Bugs/Likely Typos/CompareWhereAssignMeant.ql @@ -6,7 +6,8 @@ * @problem.severity error * @precision high * @id cpp/compare-where-assign-meant - * @tags reliability + * @tags quality + * reliability * correctness * external/cwe/cwe-482 */ diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/DubiousNullCheck.ql b/cpp/ql/src/Likely Bugs/Likely Typos/DubiousNullCheck.ql index 819ecbae8ec8..4ab16fbb8d05 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/DubiousNullCheck.ql +++ b/cpp/ql/src/Likely Bugs/Likely Typos/DubiousNullCheck.ql @@ -6,7 +6,8 @@ * @problem.severity warning * @precision very-high * @id cpp/dubious-null-check - * @tags reliability + * @tags quality + * reliability * readability */ diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/FutileConditional.ql b/cpp/ql/src/Likely Bugs/Likely Typos/FutileConditional.ql index bf724de3d70c..28dccbf47a51 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/FutileConditional.ql +++ b/cpp/ql/src/Likely Bugs/Likely Typos/FutileConditional.ql @@ -6,7 +6,8 @@ * @problem.severity recommendation * @precision high * @id cpp/empty-if - * @tags reliability + * @tags quality + * reliability * readability */ diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/ShortCircuitBitMask.ql b/cpp/ql/src/Likely Bugs/Likely Typos/ShortCircuitBitMask.ql index a1b5d7b8f358..dea16e9606d5 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/ShortCircuitBitMask.ql +++ b/cpp/ql/src/Likely Bugs/Likely Typos/ShortCircuitBitMask.ql @@ -6,7 +6,8 @@ * @problem.severity warning * @precision high * @id cpp/logical-operator-applied-to-flag - * @tags reliability + * @tags quality + * reliability * correctness * external/cwe/cwe-480 */ diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql b/cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql index 5b1d54b51f8f..3ea77e3da14b 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql +++ b/cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql @@ -7,7 +7,8 @@ * @problem.severity error * @precision high * @id cpp/string-copy-return-value-as-boolean - * @tags correctness + * @tags quality + * correctness */ import cpp diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql b/cpp/ql/src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql index 958d7aa3c559..bcff086b40dc 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql +++ b/cpp/ql/src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql @@ -5,7 +5,8 @@ * @problem.severity error * @precision high * @id cpp/inconsistent-loop-direction - * @tags correctness + * @tags quality + * correctness * external/cwe/cwe-835 * @msrc.severity important */ diff --git a/cpp/ql/src/Likely Bugs/Memory Management/ReturnCstrOfLocalStdString.ql b/cpp/ql/src/Likely Bugs/Memory Management/ReturnCstrOfLocalStdString.ql index feca6558ef6e..e028fc8219e1 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/ReturnCstrOfLocalStdString.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/ReturnCstrOfLocalStdString.ql @@ -8,7 +8,8 @@ * @problem.severity warning * @precision high * @id cpp/return-c-str-of-std-string - * @tags reliability + * @tags quality + * reliability * correctness */ diff --git a/cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql b/cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql index 38cd86a594d9..17aff3d5aaa8 100644 --- a/cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql +++ b/cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql @@ -7,7 +7,8 @@ * @problem.severity warning * @precision high * @id cpp/constructor-delegation - * @tags maintainability + * @tags quality + * maintainability * readability * language-features */ diff --git a/cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql b/cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql index 7a223f56f57b..4d3521204aee 100644 --- a/cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql +++ b/cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision high * @id cpp/virtual-destructor - * @tags reliability + * @tags quality + * reliability * readability * language-features */ diff --git a/cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql b/cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql index 75252eb45097..6b69592f596a 100644 --- a/cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql +++ b/cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql @@ -6,7 +6,8 @@ * @problem.severity warning * @precision very-high * @id cpp/throw-in-destructor - * @tags reliability + * @tags quality + * reliability * readability * language-features */ diff --git a/cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql b/cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql index 661abfd07e9c..cf91fe911e48 100644 --- a/cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql +++ b/cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision very-high * @id cpp/member-const-no-effect - * @tags maintainability + * @tags quality + * maintainability * readability * language-features */ diff --git a/cpp/ql/src/Likely Bugs/Underspecified Functions/ImplicitFunctionDeclaration.ql b/cpp/ql/src/Likely Bugs/Underspecified Functions/ImplicitFunctionDeclaration.ql index 8e921faf2117..912d8a590550 100644 --- a/cpp/ql/src/Likely Bugs/Underspecified Functions/ImplicitFunctionDeclaration.ql +++ b/cpp/ql/src/Likely Bugs/Underspecified Functions/ImplicitFunctionDeclaration.ql @@ -7,7 +7,8 @@ * @problem.severity warning * @precision high * @id cpp/implicit-function-declaration - * @tags correctness + * @tags quality + * correctness * maintainability */ diff --git a/cpp/ql/src/Likely Bugs/Underspecified Functions/TooManyArguments.ql b/cpp/ql/src/Likely Bugs/Underspecified Functions/TooManyArguments.ql index 4e7f85097b8e..f8e24bdaf3d4 100644 --- a/cpp/ql/src/Likely Bugs/Underspecified Functions/TooManyArguments.ql +++ b/cpp/ql/src/Likely Bugs/Underspecified Functions/TooManyArguments.ql @@ -7,7 +7,8 @@ * @problem.severity warning * @precision very-high * @id cpp/futile-params - * @tags correctness + * @tags quality + * correctness * maintainability */ diff --git a/cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql b/cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql index 59a6838c23e3..4f86f64bc435 100644 --- a/cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql +++ b/cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql @@ -7,7 +7,8 @@ * @problem.severity recommendation * @precision high * @id cpp/missing-header-guard - * @tags efficiency + * @tags quality + * efficiency * maintainability * modularity * external/jsf diff --git a/cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql b/cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql index ec7d446ac58a..83d406ddb9bb 100644 --- a/cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql +++ b/cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision high * @id cpp/virtual-call-in-constructor - * @tags reliability + * @tags quality + * reliability * readability * language-features * external/jsf diff --git a/cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql b/cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql index 85b779903ebf..27f9587dc17a 100644 --- a/cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql +++ b/cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql @@ -5,7 +5,8 @@ * @problem.severity warning * @precision high * @id cpp/resource-not-released-in-destructor - * @tags efficiency + * @tags quality + * efficiency * readability * external/cwe/cwe-404 * external/jsf diff --git a/cpp/ql/src/jsf/4.24 Control Flow Structures/AV Rule 197.ql b/cpp/ql/src/jsf/4.24 Control Flow Structures/AV Rule 197.ql index 4f76b4c10eaa..17f6b41b5c7d 100644 --- a/cpp/ql/src/jsf/4.24 Control Flow Structures/AV Rule 197.ql +++ b/cpp/ql/src/jsf/4.24 Control Flow Structures/AV Rule 197.ql @@ -5,7 +5,8 @@ * @problem.severity recommendation * @precision high * @id cpp/loop-variable-float - * @tags correctness + * @tags quality + * correctness * reliability * external/jsf */ From 4782abbd34849a388b9881cfc61e4fcf6c290b63 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Fri, 9 Oct 2026 16:53:16 +0100 Subject: [PATCH 3/6] C++: Add / adjust sub-tags per the guide. --- cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql | 1 + cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql | 1 + cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql | 1 + cpp/ql/src/Critical/LargeParameter.ql | 2 ++ cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql | 1 - cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql | 1 + cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql | 1 + .../src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql | 1 + cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql | 1 + 9 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql b/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql index 3709c86dcee3..facfec3ca734 100644 --- a/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql +++ b/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql @@ -6,6 +6,7 @@ * @precision very-high * @id cpp/catch-by-value * @tags quality + * reliability * efficiency * correctness * exceptions diff --git a/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql b/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql index c572fe2b2102..ec4a4babacd1 100644 --- a/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql +++ b/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql @@ -6,6 +6,7 @@ * @precision high * @id cpp/catch-missing-free * @tags quality + * reliability * efficiency * correctness * exceptions diff --git a/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql b/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql index 07b865d0abf0..f17bcb46d9c3 100644 --- a/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql +++ b/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql @@ -6,6 +6,7 @@ * @precision high * @id cpp/throwing-pointer * @tags quality + * reliability * efficiency * correctness * exceptions diff --git a/cpp/ql/src/Critical/LargeParameter.ql b/cpp/ql/src/Critical/LargeParameter.ql index c94dea2a37b3..42fd8215369a 100644 --- a/cpp/ql/src/Critical/LargeParameter.ql +++ b/cpp/ql/src/Critical/LargeParameter.ql @@ -6,6 +6,8 @@ * @precision very-high * @id cpp/large-parameter * @tags quality + * reliability + * performance * efficiency * readability * statistical diff --git a/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql b/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql index 3b2c5060a379..0887e7b8dafe 100644 --- a/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql +++ b/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql @@ -7,7 +7,6 @@ * @id cpp/duplicate-include-guard * @tags quality * reliability - * maintainability * modularity */ diff --git a/cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql b/cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql index bacba3a4fa1e..b83392c4dfb6 100644 --- a/cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql +++ b/cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql @@ -8,6 +8,7 @@ * @problem.severity warning * @precision high * @tags quality + * reliability * correctness */ diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql b/cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql index 3ea77e3da14b..3f633600667a 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql +++ b/cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql @@ -8,6 +8,7 @@ * @precision high * @id cpp/string-copy-return-value-as-boolean * @tags quality + * reliability * correctness */ diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql b/cpp/ql/src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql index bcff086b40dc..7173dfb70c58 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql +++ b/cpp/ql/src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql @@ -6,6 +6,7 @@ * @precision high * @id cpp/inconsistent-loop-direction * @tags quality + * reliability * correctness * external/cwe/cwe-835 * @msrc.severity important diff --git a/cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql b/cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql index 27f9587dc17a..5a53d903fbc9 100644 --- a/cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql +++ b/cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql @@ -6,6 +6,7 @@ * @precision high * @id cpp/resource-not-released-in-destructor * @tags quality + * reliability * efficiency * readability * external/cwe/cwe-404 From 2bbfe4f0dae21aadc1eea7254bd1e2db5a953a9b Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Mon, 12 Oct 2026 11:35:09 +0100 Subject: [PATCH 4/6] C++: Add more sub-sub-tags. --- cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql | 1 + cpp/ql/src/Best Practices/ComplexCondition.ql | 1 + cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql | 1 + cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql | 1 + cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql | 1 + cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql | 1 + cpp/ql/src/Best Practices/GuardedFree.ql | 1 + cpp/ql/src/Best Practices/UseOfGoto.ql | 1 + cpp/ql/src/Critical/NewArrayDeleteMismatch.ql | 1 + cpp/ql/src/Critical/NewDeleteArrayMismatch.ql | 1 + cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql | 2 +- cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql | 3 ++- cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql | 1 + cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql | 4 ++-- cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql | 2 +- cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql | 3 ++- cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql | 1 + cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql | 1 + 18 files changed, 21 insertions(+), 6 deletions(-) diff --git a/cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql b/cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql index b85b04575d37..a35ec36837b1 100644 --- a/cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql +++ b/cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql @@ -9,6 +9,7 @@ * testability * readability * maintainability + * complexity */ import cpp diff --git a/cpp/ql/src/Best Practices/ComplexCondition.ql b/cpp/ql/src/Best Practices/ComplexCondition.ql index 944286f1d6b0..b93d0b371e0b 100644 --- a/cpp/ql/src/Best Practices/ComplexCondition.ql +++ b/cpp/ql/src/Best Practices/ComplexCondition.ql @@ -9,6 +9,7 @@ * testability * readability * maintainability + * complexity * statistical * non-attributable */ diff --git a/cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql b/cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql index c3d39d291e49..be5a04fedb96 100644 --- a/cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql +++ b/cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql @@ -8,6 +8,7 @@ * @tags quality * reliability * correctness + * error-handling * exceptions */ diff --git a/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql b/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql index facfec3ca734..9ac27287ae3b 100644 --- a/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql +++ b/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql @@ -9,6 +9,7 @@ * reliability * efficiency * correctness + * error-handling * exceptions */ diff --git a/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql b/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql index ec4a4babacd1..97ccbdc63e07 100644 --- a/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql +++ b/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql @@ -9,6 +9,7 @@ * reliability * efficiency * correctness + * error-handling * exceptions * external/cwe/cwe-401 */ diff --git a/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql b/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql index f17bcb46d9c3..ad73b220868c 100644 --- a/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql +++ b/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql @@ -9,6 +9,7 @@ * reliability * efficiency * correctness + * error-handling * exceptions */ diff --git a/cpp/ql/src/Best Practices/GuardedFree.ql b/cpp/ql/src/Best Practices/GuardedFree.ql index 5d2116f0a7b1..76b921e56688 100644 --- a/cpp/ql/src/Best Practices/GuardedFree.ql +++ b/cpp/ql/src/Best Practices/GuardedFree.ql @@ -9,6 +9,7 @@ * @tags quality * maintainability * readability + * useless-code */ import cpp diff --git a/cpp/ql/src/Best Practices/UseOfGoto.ql b/cpp/ql/src/Best Practices/UseOfGoto.ql index 20ddb5176af5..5f360f72b869 100644 --- a/cpp/ql/src/Best Practices/UseOfGoto.ql +++ b/cpp/ql/src/Best Practices/UseOfGoto.ql @@ -9,6 +9,7 @@ * @tags quality * maintainability * readability + * complexity * language-features */ diff --git a/cpp/ql/src/Critical/NewArrayDeleteMismatch.ql b/cpp/ql/src/Critical/NewArrayDeleteMismatch.ql index ac701b58cdad..d91db6a5a5a6 100644 --- a/cpp/ql/src/Critical/NewArrayDeleteMismatch.ql +++ b/cpp/ql/src/Critical/NewArrayDeleteMismatch.ql @@ -7,6 +7,7 @@ * @id cpp/new-array-delete-mismatch * @tags quality * reliability + * correctness */ import NewDelete diff --git a/cpp/ql/src/Critical/NewDeleteArrayMismatch.ql b/cpp/ql/src/Critical/NewDeleteArrayMismatch.ql index 85484788c535..c449828da804 100644 --- a/cpp/ql/src/Critical/NewDeleteArrayMismatch.ql +++ b/cpp/ql/src/Critical/NewDeleteArrayMismatch.ql @@ -7,6 +7,7 @@ * @id cpp/new-delete-array-mismatch * @tags quality * reliability + * correctness */ import NewDelete diff --git a/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql b/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql index 0887e7b8dafe..7b2a8bb1d1de 100644 --- a/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql +++ b/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql @@ -6,7 +6,7 @@ * @precision high * @id cpp/duplicate-include-guard * @tags quality - * reliability + * maintainability * modularity */ diff --git a/cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql b/cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql index 26da97191a9d..ff2ad98085e3 100644 --- a/cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql +++ b/cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql @@ -8,7 +8,8 @@ * @precision very-high * @id cpp/unsigned-comparison-zero * @tags quality - * maintainability + * reliability + * correctness * readability */ diff --git a/cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql b/cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql index e8a08b4fb944..b50460262134 100644 --- a/cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql +++ b/cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql @@ -8,6 +8,7 @@ * @precision high * @tags quality * reliability + * correctness */ import cpp diff --git a/cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql b/cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql index 17aff3d5aaa8..55d2d620e015 100644 --- a/cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql +++ b/cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql @@ -8,8 +8,8 @@ * @precision high * @id cpp/constructor-delegation * @tags quality - * maintainability - * readability + * reliability + * correctness * language-features */ diff --git a/cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql b/cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql index 4d3521204aee..366118513aa3 100644 --- a/cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql +++ b/cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql @@ -7,7 +7,7 @@ * @id cpp/virtual-destructor * @tags quality * reliability - * readability + * correctness * language-features */ diff --git a/cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql b/cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql index 6b69592f596a..2b702d814e58 100644 --- a/cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql +++ b/cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql @@ -8,7 +8,8 @@ * @id cpp/throw-in-destructor * @tags quality * reliability - * readability + * correctness + * error-handling * language-features */ diff --git a/cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql b/cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql index cf91fe911e48..45a65d3ea44e 100644 --- a/cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql +++ b/cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql @@ -8,6 +8,7 @@ * @tags quality * maintainability * readability + * useless-code * language-features */ diff --git a/cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql b/cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql index 83d406ddb9bb..761879c98702 100644 --- a/cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql +++ b/cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql @@ -7,6 +7,7 @@ * @id cpp/virtual-call-in-constructor * @tags quality * reliability + * correctness * readability * language-features * external/jsf From e9d40d4d68be9cb83a0eec74ec6495268d2f7632 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 13 Oct 2026 09:30:35 +0100 Subject: [PATCH 5/6] C++: Change note. --- cpp/ql/src/change-notes/2026-10-12-cpp-code-quality-suite.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 cpp/ql/src/change-notes/2026-10-12-cpp-code-quality-suite.md diff --git a/cpp/ql/src/change-notes/2026-10-12-cpp-code-quality-suite.md b/cpp/ql/src/change-notes/2026-10-12-cpp-code-quality-suite.md new file mode 100644 index 000000000000..da96d01b3bad --- /dev/null +++ b/cpp/ql/src/change-notes/2026-10-12-cpp-code-quality-suite.md @@ -0,0 +1,4 @@ +--- +category: queryMetadata +--- +* Added a new `cpp-code-quality` query suite containing queries that identify maintainability and reliability issues in C and C++ code. From c0d807de8ced4119cf8ee5abac02b3dd59337ae1 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 13 Oct 2026 09:54:24 +0100 Subject: [PATCH 6/6] C++: Accept changes to suite tests. --- .../cpp-code-quality-extended.qls.expected | 45 +++++++++++++++++++ .../query-suite/cpp-code-quality.qls.expected | 45 +++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/cpp/ql/integration-tests/query-suite/cpp-code-quality-extended.qls.expected b/cpp/ql/integration-tests/query-suite/cpp-code-quality-extended.qls.expected index 85790a23a836..9e33ce500d83 100644 --- a/cpp/ql/integration-tests/query-suite/cpp-code-quality-extended.qls.expected +++ b/cpp/ql/integration-tests/query-suite/cpp-code-quality-extended.qls.expected @@ -1 +1,46 @@ +ql/cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql +ql/cpp/ql/src/Best Practices/ComplexCondition.ql +ql/cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql +ql/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql +ql/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql +ql/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql +ql/cpp/ql/src/Best Practices/GuardedFree.ql +ql/cpp/ql/src/Best Practices/Hiding/DeclarationHidesParameter.ql +ql/cpp/ql/src/Best Practices/Hiding/DeclarationHidesVariable.ql +ql/cpp/ql/src/Best Practices/Likely Errors/Slicing.ql +ql/cpp/ql/src/Best Practices/RuleOfTwo.ql +ql/cpp/ql/src/Best Practices/UseOfGoto.ql +ql/cpp/ql/src/Critical/LargeParameter.ql +ql/cpp/ql/src/Critical/NewArrayDeleteMismatch.ql +ql/cpp/ql/src/Critical/NewDeleteArrayMismatch.ql +ql/cpp/ql/src/Documentation/FixmeComments.ql +ql/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/BitwiseSignCheck.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/ComparisonPrecedence.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/FloatComparison.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/PointlessComparison.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/PointlessSelfComparison.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql +ql/cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql +ql/cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql +ql/cpp/ql/src/Likely Bugs/Conversion/ImplicitDowncastFromBitfield.ql +ql/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql ql/cpp/ql/src/Likely Bugs/Likely Typos/AmbiguousAssignmentOfComparison.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/AssignWhereCompareMeant.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/CompareWhereAssignMeant.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/DubiousNullCheck.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/FutileConditional.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/ShortCircuitBitMask.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql +ql/cpp/ql/src/Likely Bugs/Memory Management/ReturnCstrOfLocalStdString.ql +ql/cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql +ql/cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql +ql/cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql +ql/cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql +ql/cpp/ql/src/Likely Bugs/Underspecified Functions/ImplicitFunctionDeclaration.ql +ql/cpp/ql/src/Likely Bugs/Underspecified Functions/TooManyArguments.ql +ql/cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql +ql/cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql +ql/cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql +ql/cpp/ql/src/jsf/4.24 Control Flow Structures/AV Rule 197.ql diff --git a/cpp/ql/integration-tests/query-suite/cpp-code-quality.qls.expected b/cpp/ql/integration-tests/query-suite/cpp-code-quality.qls.expected index 85790a23a836..9e33ce500d83 100644 --- a/cpp/ql/integration-tests/query-suite/cpp-code-quality.qls.expected +++ b/cpp/ql/integration-tests/query-suite/cpp-code-quality.qls.expected @@ -1 +1,46 @@ +ql/cpp/ql/src/Best Practices/BlockWithTooManyStatements.ql +ql/cpp/ql/src/Best Practices/ComplexCondition.ql +ql/cpp/ql/src/Best Practices/Exceptions/AccidentalRethrow.ql +ql/cpp/ql/src/Best Practices/Exceptions/CatchingByValue.ql +ql/cpp/ql/src/Best Practices/Exceptions/LeakyCatch.ql +ql/cpp/ql/src/Best Practices/Exceptions/ThrowingPointers.ql +ql/cpp/ql/src/Best Practices/GuardedFree.ql +ql/cpp/ql/src/Best Practices/Hiding/DeclarationHidesParameter.ql +ql/cpp/ql/src/Best Practices/Hiding/DeclarationHidesVariable.ql +ql/cpp/ql/src/Best Practices/Likely Errors/Slicing.ql +ql/cpp/ql/src/Best Practices/RuleOfTwo.ql +ql/cpp/ql/src/Best Practices/UseOfGoto.ql +ql/cpp/ql/src/Critical/LargeParameter.ql +ql/cpp/ql/src/Critical/NewArrayDeleteMismatch.ql +ql/cpp/ql/src/Critical/NewDeleteArrayMismatch.ql +ql/cpp/ql/src/Documentation/FixmeComments.ql +ql/cpp/ql/src/Header Cleanup/Cleanup-DuplicateIncludeGuard.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/BitwiseSignCheck.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/ComparisonPrecedence.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/FloatComparison.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/PointlessComparison.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/PointlessSelfComparison.ql +ql/cpp/ql/src/Likely Bugs/Arithmetic/UnsignedGEZero.ql +ql/cpp/ql/src/Likely Bugs/ContinueInFalseLoop.ql +ql/cpp/ql/src/Likely Bugs/Conversion/ArrayArgSizeMismatch.ql +ql/cpp/ql/src/Likely Bugs/Conversion/ImplicitDowncastFromBitfield.ql +ql/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql ql/cpp/ql/src/Likely Bugs/Likely Typos/AmbiguousAssignmentOfComparison.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/AssignWhereCompareMeant.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/CompareWhereAssignMeant.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/DubiousNullCheck.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/FutileConditional.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/ShortCircuitBitMask.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean.ql +ql/cpp/ql/src/Likely Bugs/Likely Typos/inconsistentLoopDirection.ql +ql/cpp/ql/src/Likely Bugs/Memory Management/ReturnCstrOfLocalStdString.ql +ql/cpp/ql/src/Likely Bugs/OO/IncorrectConstructorDelegation.ql +ql/cpp/ql/src/Likely Bugs/OO/NonVirtualDestructorInBaseClass.ql +ql/cpp/ql/src/Likely Bugs/OO/ThrowInDestructor.ql +ql/cpp/ql/src/Likely Bugs/ReturnConstTypeMember.ql +ql/cpp/ql/src/Likely Bugs/Underspecified Functions/ImplicitFunctionDeclaration.ql +ql/cpp/ql/src/Likely Bugs/Underspecified Functions/TooManyArguments.ql +ql/cpp/ql/src/jsf/4.07 Header Files/AV Rule 35.ql +ql/cpp/ql/src/jsf/4.10 Classes/AV Rule 71.1.ql +ql/cpp/ql/src/jsf/4.10 Classes/AV Rule 79.ql +ql/cpp/ql/src/jsf/4.24 Control Flow Structures/AV Rule 197.ql