mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
Apply suggestions from code review
Co-Authored-By: Felicity Chapman <felicitymay@github.com> Co-Authored-By: Shati Patel <42641846+shati-patel@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Refining a query to account for edge cases
|
||||
==========================================
|
||||
|
||||
You can improve the results generated by a CodeQL query by adding conditions to remove false positives caused by common edge cases.
|
||||
You can improve the results generated by a CodeQL query by adding conditions to remove false positive results caused by common edge cases.
|
||||
|
||||
Overview
|
||||
--------
|
||||
@@ -126,7 +126,7 @@ This case can be excluded by creating a recursive predicate. The recursive predi
|
||||
Refinement 4—simplifying the query
|
||||
----------------------------------
|
||||
|
||||
Finally we can simplify the query by using the transitive closure operator. In this final version of the query, ``c.calls*(fun)`` resolves to the set of all functions that are ``c`` itself, are called by ``c``, are called by a function that is called by ``c``, and so on. This eliminates the need to make a new predicate all together. For more information, see `transitive closures <https://help.semmle.com/QL/ql-handbook/recursion.html#transitive-closures>`__ in the QL language handbook.
|
||||
Finally we can simplify the query by using the transitive closure operator. In this final version of the query, ``c.calls*(fun)`` resolves to the set of all functions that are ``c`` itself, are called by ``c``, are called by a function that is called by ``c``, and so on. This eliminates the need to make a new predicate all together. For more information, see `Transitive closures <https://help.semmle.com/QL/ql-handbook/recursion.html#transitive-closures>`__ in the QL language handbook.
|
||||
|
||||
.. code-block:: ql
|
||||
|
||||
|
||||
Reference in New Issue
Block a user