You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/language/learn-ql/cpp/basic-query-cpp.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,8 +36,8 @@ Running the query
36
36
import cpp
37
37
38
38
from IfStmt ifstmt, Block block
39
-
where ifstmt.getThen() = block
40
-
and block.getNumStmt() = 0
39
+
where ifstmt.getThen() = block and
40
+
block.getNumStmt() = 0
41
41
select ifstmt, "This 'if' statement is redundant."
42
42
43
43
LGTM checks whether your query compiles and, if all is well, the **Run** button changes to green to indicate that you can go ahead and run the query.
@@ -57,13 +57,13 @@ Running the query
57
57
58
58
The query will take a few moments to return results. When the query completes, the results are displayed below the project name. The query results are listed in two columns, corresponding to the two expressions in the ``select`` clause of the query. The first column corresponds to the expression ``ifstmt`` and is linked to the location in the source code of the project where ``ifstmt`` occurs. The second column is the alert message.
0 commit comments