Skip to content

Commit e5d2961

Browse files
authored
Merge pull request #19396 from michaelnebel/csharp/equality-on-floats
C#: Add `cs/equality-on-floats` to the Code Quality suite.
2 parents daf953f + f9d8be1 commit e5d2961

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ql/csharp/ql/src/Dead Code/DeadStoreOfLocal.ql
55
ql/csharp/ql/src/Likely Bugs/Collections/ContainerLengthCmpOffByOne.ql
66
ql/csharp/ql/src/Likely Bugs/Collections/ContainerSizeCmpZero.ql
77
ql/csharp/ql/src/Likely Bugs/DangerousNonShortCircuitLogic.ql
8+
ql/csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql
89
ql/csharp/ql/src/Likely Bugs/ReferenceEqualsOnValueTypes.ql
910
ql/csharp/ql/src/Likely Bugs/SelfAssignment.ql
1011
ql/csharp/ql/src/Likely Bugs/UncheckedCastInEquals.ql

csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* computation does not follow the standard rules of algebra.
66
* @kind problem
77
* @problem.severity warning
8-
* @precision medium
8+
* @precision high
99
* @id cs/equality-on-floats
1010
* @tags reliability
1111
* correctness
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Changed the precision of the `cs/equality-on-floats` query from medium to high.

csharp/ql/src/codeql-suites/csharp-code-quality.qls

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
- cs/non-short-circuit
1515
- cs/useless-assignment-to-local
1616
- cs/invalid-string-formatting
17+
- cs/equality-on-floats

0 commit comments

Comments
 (0)