Skip to content

Commit 0366c5d

Browse files
authored
Merge pull request github#3446 from hmakholm/rc/1.24
Merge rc/1.24 back into master
2 parents 86a774d + 46140c3 commit 0366c5d

File tree

69 files changed

+198
-217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+198
-217
lines changed

docs/language/learn-ql/beginner/catch-the-fire-starter.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,4 @@ You have found the two fire starters! They are arrested and the villagers are on
147147
Further reading
148148
---------------
149149

150-
- Find out who will be the new ruler of the village in the :doc:`next tutorial <crown-the-rightful-heir>`.
151-
- Learn more about predicates and classes in the `QL language reference <https://help.semmle.com/QL/ql-handbook/index.html>`__.
152-
- Explore the libraries that help you get data about code in :doc:`Learning CodeQL <../../index>`.
150+
.. include:: ../../reusables/codeql-ref-tools-further-reading.rst

docs/language/learn-ql/beginner/cross-the-river.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,4 +262,9 @@ Here are some more example queries that solve the river crossing puzzle:
262262
#. This query introduces `algebraic datatypes <https://help.semmle.com/QL/ql-handbook/types.html#algebraic-datatypes>`__
263263
to model the situation, instead of defining everything as a subclass of ``string``.
264264

265-
➤ `See solution in the query console on LGTM.com <https://lgtm.com/query/7260748307619718263/>`__
265+
➤ `See solution in the query console on LGTM.com <https://lgtm.com/query/7260748307619718263/>`__
266+
267+
Further reading
268+
---------------
269+
270+
.. include:: ../../reusables/codeql-ref-tools-further-reading.rst

docs/language/learn-ql/beginner/crown-the-rightful-heir.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,4 @@ You could also try writing more of your own QL queries to find interesting facts
161161
Further reading
162162
---------------
163163

164-
- Learn more about recursion in the `QL language reference <https://help.semmle.com/QL/ql-handbook/index.html>`__.
165-
- Put your QL skills to the test and solve the :doc:`River crossing puzzle <cross-the-river>`.
166-
- Start using QL to analyze projects. See :doc:`Learning CodeQL <../../index>` for a summary of the available languages and resources.
164+
.. include:: ../../reusables/codeql-ref-tools-further-reading.rst

docs/language/learn-ql/beginner/find-the-thief.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,4 @@ Have you found the thief?
292292
Further reading
293293
---------------
294294

295-
- Help the villagers track down another criminal in the :doc:`next tutorial <catch-the-fire-starter>`.
296-
- Find out more about the concepts you discovered in this tutorial in the `QL language reference <https://help.semmle.com/QL/ql-handbook/index.html>`__.
297-
- Explore the libraries that help you get data about code in :doc:`Learning CodeQL <../../index>`.
295+
.. include:: ../../reusables/codeql-ref-tools-further-reading.rst

docs/language/learn-ql/cpp/conversions-classes.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,5 @@ There is a similar built-in `query <https://lgtm.com/rules/2158670642/>`__ on LG
223223
Further reading
224224
---------------
225225

226-
- Explore other ways of querying classes using examples from the `C/C++ cookbook <https://help.semmle.com/wiki/label/CBCPP/class>`__.
227-
- Take a look at the :doc:`Analyzing data flow in C and C++ <dataflow>` tutorial.
228-
- Try the worked examples in the following topics: :doc:`Refining a query to account for edge cases <private-field-initialization>`, and :doc:`Detecting a potential buffer overflow <zero-space-terminator>`.
229-
- Find out more about QL in the `QL language reference <https://help.semmle.com/QL/ql-handbook/index.html>`__.
230-
- Learn more about the query console in `Using the query console <https://lgtm.com/help/lgtm/using-query-console>`__ on LGTM.com.
226+
.. include:: ../../reusables/cpp-further-reading.rst
227+
.. include:: ../../reusables/codeql-ref-tools-further-reading.rst

docs/language/learn-ql/cpp/dataflow.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,6 @@ Exercise 3: Write a class that represents flow sources from ``getenv``. (`Answer
299299

300300
Exercise 4: Using the answers from 2 and 3, write a query which finds all global data flows from ``getenv`` to ``gethostbyname``. (`Answer <#exercise-4>`__)
301301

302-
Further reading
303-
---------------
304-
305-
- Try the worked examples in the following topics: :doc:`Refining a query to account for edge cases <private-field-initialization>` and :doc:`Detecting a potential buffer overflow <zero-space-terminator>`.
306-
- Find out more about QL in the `QL language reference <https://help.semmle.com/QL/ql-handbook/index.html>`__.
307-
- Learn more about the query console in `Using the query console <https://lgtm.com/help/lgtm/using-query-console>`__ on LGTM.com.
308-
309302
Answers
310303
-------
311304

@@ -393,3 +386,11 @@ Exercise 4
393386
from DataFlow::Node getenv, FunctionCall fc, GetenvToGethostbynameConfiguration cfg
394387
where cfg.hasFlow(getenv, DataFlow::exprNode(fc.getArgument(0)))
395388
select getenv.asExpr(), fc
389+
390+
Further reading
391+
---------------
392+
393+
- `Exploring data flow with path queries <https://help.semmle.com/codeql/codeql-for-vscode/procedures/exploring-paths.html>`__
394+
395+
.. include:: ../../reusables/cpp-further-reading.rst
396+
.. include:: ../../reusables/codeql-ref-tools-further-reading.rst

docs/language/learn-ql/cpp/expressions-types.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,5 @@ Note that we replaced ``e.getEnclosingStmt()`` with ``e.getEnclosingStmt().getPa
132132
Further reading
133133
---------------
134134

135-
- Explore other ways of finding types and statements using examples from the C/C++ cookbook for `types <https://help.semmle.com/wiki/label/CBCPP/type>`__ and `statements <https://help.semmle.com/wiki/label/CBCPP/statement>`__.
136-
- Take a look at the :doc:`Conversions and classes in C and C++ <conversions-classes>` and :doc:`Analyzing data flow in C and C++ <dataflow>` tutorials.
137-
- Find out more about QL in the `QL language reference <https://help.semmle.com/QL/ql-handbook/index.html>`__.
138-
- Learn more about the query console in `Using the query console <https://lgtm.com/help/lgtm/using-query-console>`__ on LGTM.com.
135+
.. include:: ../../reusables/cpp-further-reading.rst
136+
.. include:: ../../reusables/codeql-ref-tools-further-reading.rst

docs/language/learn-ql/cpp/function-classes.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,5 @@ The LGTM version of this query is considerably more complicated, but if you look
9292
Further reading
9393
---------------
9494

95-
- Explore other ways of finding functions using examples from the `C/C++ cookbook <https://help.semmle.com/wiki/label/CBCPP/function>`__.
96-
- Take a look at some other tutorials: :doc:`Expressions, types and statements in C and C++ <introduce-libraries-cpp>`, :doc:`Conversions and classes in C and C++ <conversions-classes>`, and :doc:`Analyzing data flow in C and C++ <dataflow>`.
97-
- Find out more about QL in the `QL language reference <https://help.semmle.com/QL/ql-handbook/index.html>`__.
98-
- Learn more about the query console in `Using the query console <https://lgtm.com/help/lgtm/using-query-console>`__ on LGTM.com.
95+
.. include:: ../../reusables/cpp-further-reading.rst
96+
.. include:: ../../reusables/codeql-ref-tools-further-reading.rst

docs/language/learn-ql/cpp/guards.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,9 @@ The ``comparesLt`` predicate
9393

9494
``comparesLt(left, right, k, isLessThan, testIsTrue)`` holds if ``left < right + k`` evaluates to ``isLessThan`` when the expression evaluates to ``testIsTrue``.
9595

96+
Further reading
97+
---------------
98+
99+
.. include:: ../../reusables/cpp-further-reading.rst
100+
.. include:: ../../reusables/codeql-ref-tools-further-reading.rst
101+

docs/language/learn-ql/cpp/introduce-libraries-cpp.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,5 @@ This table lists `Preprocessor <https://help.semmle.com/qldoc/cpp/semmle/code/cp
525525
Further reading
526526
---------------
527527

528-
- Experiment with the worked examples in the CodeQL for C/C++ topics: :doc:`Functions in C and C++ <function-classes>`, :doc:`Expressions, types, and statements in C and C++ <expressions-types>`, :doc:`Conversions and classes in C and C++ <conversions-classes>`, and :doc:`Analyzing data flow in C and C++ <dataflow>`.
529-
- Find out more about QL in the `QL language reference <https://help.semmle.com/QL/ql-handbook/index.html>`__.
530-
- Learn more about the query console in `Using the query console <https://lgtm.com/help/lgtm/using-query-console>`__ on LGTM.com.
528+
.. include:: ../../reusables/cpp-further-reading.rst
529+
.. include:: ../../reusables/codeql-ref-tools-further-reading.rst

0 commit comments

Comments
 (0)