Skip to content

Commit 112d408

Browse files
committed
Address review comments.
1 parent 5861fcf commit 112d408

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

docs/codeql/codeql-language-guides/basic-query-for-ruby-code.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,12 @@ Browsing the results of our basic query shows that it could be improved. Among t
108108

109109
.. code-block:: ruby
110110
111-
if ...
112-
...
113-
elsif option == "-verbose"
111+
if option == "-verbose"
114112
# nothing to do - handled earlier
115113
else
116114
error "unrecognized option"
117115
118-
In this case, identifying the ``if`` statement with the empty ``then`` branch as redundant is a false positive. One solution to this is to modify the query to ignore empty ``then`` branches if the ``if`` statement has an ``else`` branch.
116+
In this case, identifying the ``if`` statement with the empty ``then`` branch as redundant is a false positive. One solution to this is to modify the query to select ``if`` statements where both the ``then`` and ``else`` branches are missing.
119117

120118
To exclude ``if`` statements that have an ``else`` branch:
121119

docs/codeql/codeql-language-guides/codeql-library-for-ruby.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The CodeQL examples in this article are only excerpts and are not meant to repre
7373
Abstract syntax
7474
---------------
7575

76-
The abstract syntax tree (AST) represents the elements of the source code organized into a tree. The AST viewer
76+
The abstract syntax tree (AST) represents the elements of the source code organized into a tree. The `AST viewer <https://codeql.github.com/docs/codeql-for-visual-studio-code/exploring-the-structure-of-your-source-code/>`__
7777
in Visual Studio Code shows the AST nodes, including the relevant CodeQL classes and predicates.
7878

7979
All CodeQL AST classes inherit from the `AstNode` class, which provides the following member predicates

0 commit comments

Comments
 (0)