Skip to content

Commit 037211c

Browse files
committed
Add formatting fixes
1 parent 8cba276 commit 037211c

10 files changed

+12
-12
lines changed

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

+1-1
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 <https://docs.github.com/en/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/exploring-the-structure-of-your-source-code>`__
76+
The abstract syntax tree (AST) represents the elements of the source code organized into a tree. The `AST viewer <https://docs.github.com/en/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/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

Diff for: docs/codeql/codeql-overview/about-codeql.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ After you've created a CodeQL database, one or more queries are executed
7171
against it. CodeQL queries are written in a specially-designed object-oriented
7272
query language called QL. You can run the queries checked out from the CodeQL
7373
repo (or custom queries that you've written yourself) using the `CodeQL
74-
for VS Code extension <https://docs.github.com/en/code-security/codeql-for-vs-code/>` or the `CodeQL CLI
74+
for VS Code extension <https://docs.github.com/en/code-security/codeql-for-vs-code/>`__ or the `CodeQL CLI
7575
<https://docs.github.com/en/code-security/codeql-cli>`__. For more information about queries, see ":ref:`About CodeQL queries <about-codeql-queries>`."
7676

7777
.. _interpret-query-results:

Diff for: docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.8.1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Bug Fixes
8282
Python
8383
""""""
8484

85-
* The `View AST functionality <https://docs.github.com/en/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/exploring-the-structure-of-your-source-code>`__ no longer prints detailed information about regular expressions, greatly improving performance.
85+
* The `View AST functionality <https://docs.github.com/en/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/exploring-the-structure-of-your-source-code/>`__ no longer prints detailed information about regular expressions, greatly improving performance.
8686

8787
Minor Analysis Improvements
8888
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Diff for: docs/codeql/codeql-overview/codeql-tools.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ CodeQL for Visual Studio Code
5454
You can analyze CodeQL databases in Visual Studio Code using the CodeQL
5555
extension, which provides an enhanced environment for writing and running custom
5656
queries and viewing the results. For more information, see "`CodeQL
57-
for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>`."
57+
for Visual Studio Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>`__."

Diff for: docs/codeql/reusables/deprecation-note.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
Note
44

5-
This documentation has been migrated to docs.github.com/en/code-security/codeql-for-vs-code. This version is no longer maintained, and it will be removed on TODOCS.
5+
This documentation was migrated to docs.github.com/en/code-security/codeql-for-vs-code on 2024/05/08, and this version is no longer maintained.
66

Diff for: docs/codeql/writing-codeql-queries/creating-path-queries.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This topic provides information on how to structure a path query file so you can
2020

2121
Note
2222

23-
The alerts generated by path queries are included in the results generated using the `CodeQL CLI <https://docs.github.com/en/code-security/codeql-cli>`__ and in `code scanning <https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-alert-details>`__. You can also view the path explanations generated by your path query in the `CodeQL extension for VS Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>`.
23+
The alerts generated by path queries are included in the results generated using the `CodeQL CLI <https://docs.github.com/en/code-security/codeql-cli>`__ and in `code scanning <https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-alert-details>`__. You can also view the path explanations generated by your path query in the `CodeQL extension for VS Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>`__.
2424

2525

2626
To learn more about modeling data flow with CodeQL, see ":doc:`About data flow analysis <about-data-flow-analysis>`."
@@ -171,7 +171,7 @@ Select clauses for path queries consist of four 'columns', with the following st
171171
select element, source, sink, string
172172

173173
The ``element`` and ``string`` columns represent the location of the alert and the alert message respectively, as explained in ":doc:`About CodeQL queries <about-codeql-queries>`." The second and third columns, ``source`` and ``sink``, are nodes on the path graph selected by the query.
174-
Each result generated by your query is displayed at a single location in the same way as an alert query. Additionally, each result also has an associated path, which can be viewed in the `CodeQL extension for VS Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>`.
174+
Each result generated by your query is displayed at a single location in the same way as an alert query. Additionally, each result also has an associated path, which can be viewed in the `CodeQL extension for VS Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>`__.
175175

176176
The ``element`` that you select in the first column depends on the purpose of the query and the type of issue that it is designed to find. This is particularly important for security issues. For example, if you believe the ``source`` value to be globally invalid or malicious it may be best to display the alert at the ``source``. In contrast, you should consider displaying the alert at the ``sink`` if you believe it is the element that requires sanitization.
177177

Diff for: docs/codeql/writing-codeql-queries/defining-the-results-of-a-query.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ About query results
99
-------------------
1010

1111
The information contained in the results of a query is controlled by the ``select`` statement. Part of the process of developing a useful query is to make the results clear and easy for other users to understand.
12-
When you write your own queries in the CodeQL `extension for VS Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>` there are no constraints on what can be selected.
12+
When you write your own queries in the CodeQL `extension for VS Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>`__ there are no constraints on what can be selected.
1313
However, if you want to use a query to create alerts for code scanning or generate valid analysis results using the `CodeQL CLI <https://docs.github.com/en/code-security/codeql-cli>`__, you'll need to make the ``select`` statement report results in the required format.
1414
You must also ensure that the query has the appropriate metadata properties defined.
1515
This topic explains how to write your select statement to generate helpful analysis results.

Diff for: docs/codeql/writing-codeql-queries/introduction-to-ql.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ QL also supports recursion and aggregates. This allows you to write complex recu
1919
Running a query
2020
---------------
2121

22-
You can try out the following examples and exercises using `CodeQL for VS Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>` or the `CodeQL template <https://github.com/codespaces/new?template_repository=github/codespaces-codeql>`__ on GitHub Codespaces.
22+
You can try out the following examples and exercises using `CodeQL for VS Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>`__ or the `CodeQL template <https://github.com/codespaces/new?template_repository=github/codespaces-codeql>`__ on GitHub Codespaces.
2323

2424
Here is an example of a basic query:
2525

@@ -114,7 +114,7 @@ The following example queries *do* use these databases and give you an idea of h
114114
Queries using the CodeQL libraries can find errors and uncover variants of important security vulnerabilities in codebases.
115115
Visit `GitHub Security Lab <https://securitylab.github.com/>`__ to read about examples of vulnerabilities that we have recently found in open source projects.
116116

117-
Before you can run the following examples, you will need to install the CodeQL extension for Visual Studio Code. For more information, see :ref:`Setting up CodeQL in Visual Studio Code <setting-up-codeql-in-visual-studio-code>`. You will also need to import and select a database in the corresponding programming language. For more information about obtaining CodeQL databases, see `Managing CodeQL databases <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/managing-codeql-databases>`__ in the CodeQL for VS Code documentation.
117+
Before you can run the following examples, you will need to install the CodeQL extension for Visual Studio Code. For more information, see :ref:`Setting up CodeQL in Visual Studio Code <setting-up-codeql-in-visual-studio-code>`. You will also need to import and select a database in the corresponding programming language. For more information about obtaining CodeQL databases, see `Managing CodeQL databases <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/managing-codeql-databases/>`__ in the CodeQL for VS Code documentation.
118118

119119
To import the CodeQL library for a specific programming language, type ``import <language>`` at the start of the query.
120120

Diff for: docs/codeql/writing-codeql-queries/metadata-for-codeql-queries.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ About query metadata
99
--------------------
1010

1111
Any query that is run as part of an analysis includes a number of properties, known as query metadata. Metadata is included at the top of each query file as the content of a QLDoc comment.
12-
This metadata tells the CodeQL `extension for VS Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>` and the `Code scanning feature in GitHub <https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql>`__ how to handle the query and display its results correctly.
12+
This metadata tells the CodeQL `extension for VS Code <https://docs.github.com/en/code-security/codeql-for-vs-code/>`__ and the `Code scanning feature in GitHub <https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql>`__ how to handle the query and display its results correctly.
1313
It also gives other users information about what the query results mean. For more information on query metadata, see the `query metadata style guide <https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md>`__ in our `open source repository <https://github.com/github/codeql>`__ on GitHub.
1414

1515
.. pull-quote::

Diff for: docs/supported-queries.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The process must begin with the first step and must conclude with the final step
4545
- Understand [the evaluation model of QL](https://codeql.github.com/docs/ql-language-reference/evaluation-of-ql-programs/). It's more similar to SQL than to any mainstream programming language.
4646
- Most performance tuning in QL boils down to computing as few tuples (rows of data) as possible. As a mental model, think of predicate evaluation as enumerating all combinations of parameters that satisfy the predicate body. This includes the implicit parameters `this` and `result`.
4747
- The major libraries in CodeQL are _cached_ and will only be computed once for the entire suite of queries. The first query that needs a cached _stage_ will trigger its evaluation. This means that query authors should usually only look at the run time of the last stage of evaluation.
48-
- In [the settings for the VSCode extension](https://docs.github.com/en/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/customizing-settings), check the box "Running Queries: Debug" (`codeQL.runningQueries.debug`). Then find "CodeQL Query Server" in the VSCode Output panel (View -> Output) and capture the output when running the query. That output contains timing and tuple counts for all computed predicates.
48+
- In [the settings for the VSCode extension](https://docs.github.com/en/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/customizing-settings/), check the box "Running Queries: Debug" (`codeQL.runningQueries.debug`). Then find "CodeQL Query Server" in the VSCode Output panel (View -> Output) and capture the output when running the query. That output contains timing and tuple counts for all computed predicates.
4949
- To clear the entire cache, invoke "CodeQL: Clear Cache" from the VSCode command palette.
5050

5151
6. **Make sure your query has the correct metadata**

0 commit comments

Comments
 (0)