Skip to content

Commit 97c107b

Browse files
authored
Merge pull request #4091 from jf205/link-quotes-ql-handbook
QL language reference: update links to match GitHub docs style
2 parents 378e3b2 + 8ad6947 commit 97c107b

File tree

14 files changed

+58
-65
lines changed

14 files changed

+58
-65
lines changed

docs/language/ql-handbook/about-the-ql-language.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ QL is the powerful query language that underlies CodeQL, which is used to analyz
66
About query languages and databases
77
-----------------------------------
88

9-
This section is aimed at users with a background in general purpose programming as well as in databases. For a basic introduction and information on how to get started, see `Learning CodeQL <https://help.semmle.com/QL/learn-ql/index.html>`__.
9+
This section is aimed at users with a background in general purpose programming as well as in databases. For a basic introduction and information on how to get started, see "`Learning CodeQL <https://help.semmle.com/QL/learn-ql/index.html>`__."
1010

1111
QL is a declarative, object-oriented query language that is optimized to enable efficient analysis of hierarchical data structures, in particular, databases representing software artifacts.
1212

@@ -39,10 +39,10 @@ When you write this process in QL, it closely resembles the above structure. Not
3939
result = count(getADescendant(p))
4040
}
4141
42-
For more information about the important concepts and syntactic constructs of QL, see the individual reference topics such as :doc:`Expressions <expressions>` and :doc:`Recursion <recursion>`.
42+
For more information about the important concepts and syntactic constructs of QL, see the individual reference topics such as ":doc:`Expressions <expressions>`" and ":doc:`Recursion <recursion>`."
4343
The explanations and examples help you understand how the language works, and how to write more advanced QL code.
4444

45-
For formal specifications of the QL language and QLDoc comments, see the :doc:`QL language specification <language>` and :doc:`QLDoc comment specification <qldoc>`.
45+
For formal specifications of the QL language and QLDoc comments, see the ":doc:`QL language specification <language>`" and ":doc:`QLDoc comment specification <qldoc>`."
4646

4747
QL and object orientation
4848
-------------------------

docs/language/ql-handbook/annotations.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ You can also find a summary table in the Annotations section of the
5353

5454
The ``abstract`` annotation is used to define an abstract entity.
5555

56-
For information about **abstract classes**, see :ref:`Classes <abstract-classes>`.
56+
For information about **abstract classes**, see ":ref:`Classes <abstract-classes>`."
5757

5858
**Abstract predicates** are member predicates that have no body. They can be defined on any
5959
class, and should be :ref:`overridden <overriding-member-predicates>` in non-abstract subtypes.
@@ -359,7 +359,7 @@ Language pragmas
359359
This annotation allows you to use **monotonic aggregates** instead of the standard QL
360360
:ref:`aggregates <aggregations>`.
361361

362-
For more information, see :ref:`monotonic-aggregates`.
362+
For more information, see ":ref:`monotonic-aggregates`."
363363

364364
.. _bindingset:
365365

@@ -380,7 +380,7 @@ The ``bindingset`` annotation takes a comma-separated list of variables. Each va
380380
an argument of the predicate, possibly including ``this`` (for characteristic predicates and
381381
member predicates) and ``result`` (for predicates that return a result).
382382

383-
See :ref:`predicate-binding` in the :ref:`predicates` topic for examples and more information.
383+
For more information, see ":ref:`predicate-binding`."
384384

385385
.. Links to use in substitutions
386386

docs/language/ql-handbook/evaluation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ Each evaluation starts from these sets of tuples.
2626
The remaining predicates and types in the program are organized into a number of layers, based
2727
on the dependencies between them.
2828
These layers are evaluated to produce their own sets of tuples, by finding the least fixed point
29-
of each predicate. (For example, see :ref:`recursion`.)
29+
of each predicate. (For example, see ":ref:`recursion`.")
3030

3131
The program's :ref:`queries <query>` determine which of these sets of tuples make up the final
3232
results of the program. The results are sorted according to any ordering directives
3333
(``order by``) in the queries.
3434

35-
For more details about each step of the evaluation process, see the `QL language specification
36-
<https://help.semmle.com/QL/ql-spec/language.html#evaluation>`_.
35+
For more details about each step of the evaluation process, see the "`QL language specification
36+
<https://help.semmle.com/QL/ql-spec/language.html#evaluation>`_."
3737

3838
Validity of programs
3939
********************
@@ -97,7 +97,7 @@ To do this, you can use the following mechanisms:
9797
.. important:: If a predicate uses non-standard binding sets, then it does **not** always bind
9898
all its arguments. In such a case, whether the predicate call binds a specific argument
9999
depends on which other arguments are bound, and what the binding sets say about the
100-
argument in question. See :ref:`binding-sets` for more information.
100+
argument in question. For more information, see ":ref:`binding-sets`."
101101

102102
#. **Binding operators**: Most operators, such as the :ref:`arithmetic operators <binary-operations>`,
103103
require that all their operands are bound. For example, you can't add two variables in QL

docs/language/ql-handbook/expressions.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ Calls to predicates (with result)
160160

161161
Calls to :ref:`predicates with results <predicates-with-result>` are themselves expressions,
162162
unlike calls to :ref:`predicates without results <predicates-without-result>` which are
163-
formulas. See :ref:`calls` in the :ref:`formulas` topic for more general information about
164-
calls.
163+
formulas. For more information, see ":ref:`calls`."
165164

166165
A call to a predicate with result evaluates to the values of the ``result`` variable of the
167166
called predicate.
@@ -350,7 +349,7 @@ Let us apply these steps to the ``sum`` aggregate in the following query:
350349
#. Apply the aggregation function ``sum`` on the above values to get the final result ``60``.
351350

352351
If we change ``<expression>`` to ``i + j`` in the above query, the query result is ``135`` since
353-
applying ``i + j`` on all tuples results in following values: 
352+
applying ``i + j`` on all tuples results in following values:
354353
\ ``0, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 4, 5, 6, 7, 8, 9``.
355354

356355
Next, consider the following query:

docs/language/ql-handbook/formulas.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,13 @@ A call to a predicate can also contain a closure operator, namely ``*`` or ``+``
148148
``a.isChildOf+(b)`` is a call to the :ref:`transitive closure <transitive-closures>` of
149149
``isChildOf()``, so it holds if ``a`` is a descendent of ``b``.
150150

151-
The predicate reference must resolve to exactly one predicate. See :ref:`name-resolution` for
152-
more information about how a predicate reference is resolved.
151+
The predicate reference must resolve to exactly one predicate. For more information about how a predicate
152+
reference is resolved, see ":ref:`name-resolution`."
153153

154154
If the call resolves to a predicate without result, then the call is a formula.
155155

156156
It is also possible to call a predicate with result. This kind of call is an
157-
expression in QL, instead of a formula. See :ref:`calls-with-result` for the corresponding
158-
topic.
157+
expression in QL, instead of a formula. For more information, see ":ref:`calls-with-result`."
159158

160159
.. _parenthesized-formulas:
161160

@@ -251,7 +250,7 @@ Implicit quantifiers
251250

252251
Implicitly quantified variables can be introduced using "don't care expressions." These are used
253252
when you need to introduce a variable to use as an argument to a predicate call, but don't care
254-
about its value. For further information, see :ref:`Don't-care expressions <dont-care>`.
253+
about its value. For further information, see ":ref:`Don't-care expressions <dont-care>`."
255254

256255
.. _connectives:
257256

@@ -305,7 +304,7 @@ The following query selects files that are not HTML files.
305304

306305
.. note::
307306
You should be careful when using ``not`` in a recursive definition, as this could lead to
308-
non-monotonic recursion. For more information, see the section on :ref:`non-monotonic-recursion`.
307+
non-monotonic recursion. For more information, ":ref:`non-monotonic-recursion`."
309308

310309
.. index:: if, then, else
311310
.. _conditional:

0 commit comments

Comments
 (0)