Skip to content

Commit 0261e26

Browse files
committed
progress
1 parent b3ea832 commit 0261e26

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

cpp/ql/src/Likely Bugs/Arithmetic/FloatComparison.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ where
2121
FloatingPointType and
2222
not ro.getAnOperand().isConstant() and // comparisons to constants generate too many false positives
2323
not left.(VariableAccess).getTarget() = right.(VariableAccess).getTarget() // skip self comparison
24-
select ro, "Equality test on floating point values may not behave as expected."
24+
select ro, "Equality checks on floating point values can yield unexpected results."

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/**
22
* @name Equality check on floating point values
3-
* @description Equality checks on floating point values can yield unexpected results.
3+
* @description Comparing results of floating-point computations with '==' or
4+
* '!=' is likely to yield surprising results since floating-point
5+
* computation does not follow the standard rules of algebra.
46
* @kind problem
57
* @problem.severity warning
68
* @precision medium

csharp/ql/src/Useless code/RedundantToStringCall.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ from MethodCall mc
1818
where
1919
mc instanceof ImplicitToStringExpr and
2020
mc.getTarget() instanceof ToStringMethod
21-
select mc, "Redundant call to 'ToString'."
21+
select mc, "Redundant call to 'ToString' on a String object."

javascript/ql/src/Security/CWE-022/TaintedPath.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ import DataFlow::PathGraph
2121

2222
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
2323
where cfg.hasFlowPath(source, sink)
24-
select p, source, sink, "$@ flows to here and is used in a path.", source.getNode(),
24+
select sink.getNode(), source, sink, "$@ flows to here and is used in a path.", source.getNode(),
2525
"User-provided value"

python/ql/src/Lexical/CommentedOutCode.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ import Lexical.CommentedOutCode
1616

1717
from CommentedOutCodeBlock c
1818
where not c.maybeExampleCode()
19-
select c, "These comments appear to contain commented-out code."
19+
select c, "This comment appears to contain commented-out code."

ql/ql/src/queries/style/ConsistentAlertMessage.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ Select getSelectForQuery(string id, string lang, string msg, string kind, int pa
2727
id = doc.getContents().regexpCapture("(?s).*@id (\\w+)/([\\w\\-]+)\\s.*", 2) and
2828
lang = doc.getContents().regexpCapture("(?s).*@id (\\w+)/([\\w\\-]+)\\s.*", 1) and
2929
kind = doc.getContents().regexpCapture("(?s).*@kind (\\w+)\\s.*", 1) and // enforcing the same kind.
30-
msg = getMessage(result) and
30+
msg = getMessage(result).toLowerCase() and // case normalize, because some languages upper-case methods.
3131
parts = parts(result)
3232
) and
3333
// excluding experimetnal
34-
not result.getLocation().getFile().getRelativePath().matches("%/experimental/%")
34+
not result.getLocation().getFile().getRelativePath().matches("%/experimental/%") and
35+
not lang = "ql" // excluding QL-for-QL
3536
}
3637

3738
from Select sel, string id, string lang, string msg, string kind, int parts, string badLangs

0 commit comments

Comments
 (0)