mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
QL etudes: Add further explanation + link
This commit is contained in:
@@ -160,4 +160,5 @@ What next?
|
||||
----------
|
||||
|
||||
- Learn more about recursion in the `QL language handbook <https://help.semmle.com/QL/ql-handbook/index.html>`__.
|
||||
- Put your QL skills to the test and solve the :doc:`River crossing puzzle <../ql-etudes/river-crossing>`.
|
||||
- Start using QL to analyze projects. See :doc:`Learning QL <../../index>` for a summary of the available languages and resources.
|
||||
|
||||
@@ -227,8 +227,11 @@ that returns the resulting path.
|
||||
.. literalinclude:: river-crossing.ql
|
||||
:lines: 115-117
|
||||
|
||||
For now, the path defined in the above predicate ``reachesVia`` just lists the order of cargo items to ferry.
|
||||
You could tweak the predicates and the select clause to make the solution clearer. Here are some suggestions:
|
||||
The `don't-care expression <https://help.semmle.com/QL/ql-handbook/expressions.html#don-t-care-expressions>`__ (``_``),
|
||||
as the second argument to the ``reachesVia`` predicate, represents any value of ``visitedStates``.
|
||||
|
||||
For now, the path defined in ``reachesVia`` just lists the order of cargo items to ferry.
|
||||
You could tweak the predicate and the select clause to make the solution clearer. Here are some suggestions:
|
||||
|
||||
- Display more information, such as the direction in which the cargo is ferried, for example
|
||||
``"Goat to the left shore"``.
|
||||
|
||||
Reference in New Issue
Block a user