Skip to content

Commit 2225a2d

Browse files
authored
Merge pull request #19763 from owen-mc/go/quality-tags
Go: Update tags for high precision quality queries
2 parents bea855a + ebd9176 commit 2225a2d

25 files changed

+120
-37
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
ql/go/ql/src/InconsistentCode/ConstantLengthComparison.ql
2+
ql/go/ql/src/InconsistentCode/InconsistentLoopOrientation.ql
13
ql/go/ql/src/InconsistentCode/LengthComparisonOffByOne.ql
24
ql/go/ql/src/InconsistentCode/MissingErrorCheck.ql
5+
ql/go/ql/src/InconsistentCode/MistypedExponentiation.ql
36
ql/go/ql/src/InconsistentCode/UnhandledCloseWritableHandle.ql
7+
ql/go/ql/src/InconsistentCode/WhitespaceContradictsPrecedence.ql
48
ql/go/ql/src/InconsistentCode/WrappedErrorAlwaysNil.ql
9+
ql/go/ql/src/RedundantCode/CompareIdenticalValues.ql
10+
ql/go/ql/src/RedundantCode/DeadStoreOfField.ql
11+
ql/go/ql/src/RedundantCode/DeadStoreOfLocal.ql
12+
ql/go/ql/src/RedundantCode/DuplicateBranches.ql
13+
ql/go/ql/src/RedundantCode/DuplicateCondition.ql
14+
ql/go/ql/src/RedundantCode/DuplicateSwitchCase.ql
15+
ql/go/ql/src/RedundantCode/ExprHasNoEffect.ql
16+
ql/go/ql/src/RedundantCode/ImpossibleInterfaceNilCheck.ql
517
ql/go/ql/src/RedundantCode/NegativeLengthCheck.ql
18+
ql/go/ql/src/RedundantCode/RedundantExpr.ql
619
ql/go/ql/src/RedundantCode/RedundantRecover.ql
20+
ql/go/ql/src/RedundantCode/SelfAssignment.ql
21+
ql/go/ql/src/RedundantCode/ShiftOutOfRange.ql
22+
ql/go/ql/src/RedundantCode/UnreachableStatement.ql
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
ql/go/ql/src/InconsistentCode/ConstantLengthComparison.ql
2+
ql/go/ql/src/InconsistentCode/InconsistentLoopOrientation.ql
13
ql/go/ql/src/InconsistentCode/LengthComparisonOffByOne.ql
24
ql/go/ql/src/InconsistentCode/MissingErrorCheck.ql
5+
ql/go/ql/src/InconsistentCode/MistypedExponentiation.ql
36
ql/go/ql/src/InconsistentCode/UnhandledCloseWritableHandle.ql
7+
ql/go/ql/src/InconsistentCode/WhitespaceContradictsPrecedence.ql
48
ql/go/ql/src/InconsistentCode/WrappedErrorAlwaysNil.ql
9+
ql/go/ql/src/RedundantCode/CompareIdenticalValues.ql
10+
ql/go/ql/src/RedundantCode/DeadStoreOfField.ql
11+
ql/go/ql/src/RedundantCode/DeadStoreOfLocal.ql
12+
ql/go/ql/src/RedundantCode/DuplicateBranches.ql
13+
ql/go/ql/src/RedundantCode/DuplicateCondition.ql
14+
ql/go/ql/src/RedundantCode/DuplicateSwitchCase.ql
15+
ql/go/ql/src/RedundantCode/ExprHasNoEffect.ql
16+
ql/go/ql/src/RedundantCode/ImpossibleInterfaceNilCheck.ql
517
ql/go/ql/src/RedundantCode/NegativeLengthCheck.ql
18+
ql/go/ql/src/RedundantCode/RedundantExpr.ql
619
ql/go/ql/src/RedundantCode/RedundantRecover.ql
20+
ql/go/ql/src/RedundantCode/SelfAssignment.ql
21+
ql/go/ql/src/RedundantCode/ShiftOutOfRange.ql
22+
ql/go/ql/src/RedundantCode/UnreachableStatement.ql

go/ql/src/InconsistentCode/ConstantLengthComparison.ql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
* @kind problem
66
* @problem.severity warning
77
* @id go/constant-length-comparison
8-
* @tags correctness
8+
* @tags quality
9+
* reliability
10+
* correctness
11+
* external/cwe/cwe-129
912
* @precision high
1013
*/
1114

go/ql/src/InconsistentCode/InconsistentLoopOrientation.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
* @kind problem
99
* @problem.severity error
1010
* @id go/inconsistent-loop-direction
11-
* @tags correctness
11+
* @tags quality
12+
* reliability
13+
* correctness
1214
* external/cwe/cwe-835
1315
* @precision very-high
1416
*/

go/ql/src/InconsistentCode/LengthComparisonOffByOne.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
* @kind problem
66
* @problem.severity error
77
* @id go/index-out-of-bounds
8-
* @tags reliability
8+
* @tags quality
9+
* reliability
910
* correctness
10-
* logic
11-
* quality
1211
* external/cwe/cwe-193
1312
* @precision high
1413
*/

go/ql/src/InconsistentCode/MissingErrorCheck.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
* @kind problem
66
* @problem.severity warning
77
* @id go/missing-error-check
8-
* @tags reliability
9-
* correctness
10-
* logic
11-
* quality
8+
* @tags quality
9+
* reliability
10+
* error-handling
11+
* external/cwe/cwe-252
1212
* @precision high
1313
*/
1414

go/ql/src/InconsistentCode/MistypedExponentiation.ql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
* @kind problem
55
* @problem.severity warning
66
* @id go/mistyped-exponentiation
7-
* @tags correctness
7+
* @tags quality
8+
* reliability
9+
* correctness
10+
* external/cwe/cwe-480
811
* @precision high
912
*/
1013

go/ql/src/InconsistentCode/UnhandledCloseWritableHandle.ql

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
* @problem.severity warning
88
* @precision high
99
* @id go/unhandled-writable-file-close
10-
* @tags maintainability
11-
* correctness
12-
* call
13-
* defer
14-
* quality
10+
* @tags quality
11+
* reliability
12+
* error-handling
13+
* external/cwe/cwe-252
1514
*/
1615

1716
import go

go/ql/src/InconsistentCode/WhitespaceContradictsPrecedence.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/**
22
* @name Whitespace contradicts operator precedence
33
* @description Nested expressions where the formatting contradicts the grouping enforced by operator precedence
4-
* are difficult to read and may even indicate a bug.
4+
* are difficult to read and may indicate a bug.
55
* @kind problem
66
* @problem.severity warning
77
* @id go/whitespace-contradicts-precedence
8-
* @tags maintainability
8+
* @tags quality
9+
* reliability
910
* correctness
1011
* external/cwe/cwe-783
1112
* @precision very-high

go/ql/src/InconsistentCode/WrappedErrorAlwaysNil.ql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* @kind problem
55
* @problem.severity warning
66
* @id go/unexpected-nil-value
7-
* @tags reliability
8-
* correctness
9-
* logic
10-
* quality
7+
* @tags quality
8+
* reliability
9+
* error-handling
1110
* @precision high
1211
*/
1312

0 commit comments

Comments
 (0)