Skip to content

Commit 9587097

Browse files
authored
Merge pull request github#3763 from adityasharad/java/training-example-brace
Fix training example syntax
2 parents 55ce5ce + 915148f commit 9587097

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/language/ql-training/query-examples/cpp/data-flow-cpp-2.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import cpp
22
import semmle.code.cpp.dataflow.DataFlow
33
import semmle.code.cpp.commons.Printf
44

5-
class SourceNode extends DataFlow::Node { ... }
5+
class SourceNode extends DataFlow::Node { /* ... */ }
66

77
from FormattingFunction f, Call c, SourceNode src, DataFlow::Node arg
88
where c.getTarget() = f and
99
arg.asExpr() = c.getArgument(f.getFormatParameterIndex()) and
1010
DataFlow::localFlow(src, arg) and
1111
not src.asExpr() instanceof StringLiteral
12-
select arg, "Non-constant format string."
12+
select arg, "Non-constant format string."

docs/language/ql-training/query-examples/java/empty-if-java-class.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import java
33
class EmptyBlock extends Block {
44
EmptyBlock() {
55
this.getNumStmt() = 0
6-
6+
}
77
}
88

99
from IfStmt ifstmt
1010
where ifstmt.getThen() instanceof
1111
EmptyBlock
12-
select ifstmt
12+
select ifstmt

0 commit comments

Comments
 (0)