From c33c5ed517eb94a3cb595ef7ee8fddb13942df0f Mon Sep 17 00:00:00 2001 From: Sarita Iyer <66540150+saritai@users.noreply.github.com> Date: Fri, 3 Feb 2023 09:56:49 -0500 Subject: [PATCH] Update codeql-cli links --- .../analyzing-your-projects.rst | 2 +- .../codeql-for-visual-studio-code/customizing-settings.rst | 2 +- .../setting-up-codeql-in-visual-studio-code.rst | 4 ++-- .../codeql-library-for-typescript.rst | 2 +- docs/codeql/codeql-overview/about-codeql.rst | 4 ++-- docs/codeql/codeql-overview/codeql-tools.rst | 2 +- .../ql-language-reference/ql-language-specification.rst | 2 +- docs/codeql/writing-codeql-queries/about-codeql-queries.rst | 6 +++--- .../codeql/writing-codeql-queries/creating-path-queries.rst | 2 +- .../defining-the-results-of-a-query.rst | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst b/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst index ce8df70b4f4..edcfc7e75da 100644 --- a/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst +++ b/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst @@ -32,7 +32,7 @@ If you have a CodeQL database saved locally, as an unarchived folder or as a ZIP - To create a database with the CodeQL CLI, see "`Creating CodeQL databases `__." - To analyze a test database, add a ``.testproj`` folder to the Databases view. - Test databases (that is, folders with a ``.testproj`` extension) are generated when you run regression tests on custom queries using the :ref:`CodeQL CLI `. + Test databases (that is, folders with a ``.testproj`` extension) are generated when you run regression tests on custom queries using the CodeQL CLI. If a query fails a regression test, you may want to analyze the test database in Visual Studio Code to debug the failure. For more information about running query tests, see "`Testing custom queries `__" in the CodeQL CLI help. diff --git a/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst b/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst index 0840cd67e21..06802873ae8 100644 --- a/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst +++ b/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst @@ -80,4 +80,4 @@ Further reading ---------------- - `User and workspace settings `__ in the Visual Studio Code help -- ":ref:`CodeQL CLI `" \ No newline at end of file +- "`CodeQL CLI `__" \ No newline at end of file diff --git a/docs/codeql/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code.rst b/docs/codeql/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code.rst index e833b51425f..6ed374381d8 100644 --- a/docs/codeql/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code.rst +++ b/docs/codeql/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code.rst @@ -28,7 +28,7 @@ Configuring access to the CodeQL CLI The extension uses the CodeQL CLI to compile and run queries. -If you already have the CLI installed and added to your ``PATH``, the extension uses that version. This might be the case if you create your own CodeQL databases instead of downloading them from GitHub.com. For more information, see ":ref:`CodeQL CLI `." +If you already have the CLI installed and added to your ``PATH``, the extension uses that version. This might be the case if you create your own CodeQL databases instead of downloading them from GitHub.com. For more information, see `CodeQL CLI `__." Otherwise, the extension automatically manages access to the executable of the CLI for you. This ensures that the CLI is compatible with the CodeQL extension. You can also check for updates with the **CodeQL: Check for CLI Updates** command. @@ -102,4 +102,4 @@ Further reading ---------------- * ":doc:`Analyzing your projects `" -* ":ref:`CodeQL CLI `" +* "`CodeQL CLI `__" diff --git a/docs/codeql/codeql-language-guides/codeql-library-for-typescript.rst b/docs/codeql/codeql-language-guides/codeql-library-for-typescript.rst index b1709bb05c5..3b998426e7b 100644 --- a/docs/codeql/codeql-language-guides/codeql-library-for-typescript.rst +++ b/docs/codeql/codeql-language-guides/codeql-library-for-typescript.rst @@ -177,7 +177,7 @@ Ambient nodes are mostly ignored by control flow and data flow analysis. The out Static type information ----------------------- -Static type information and global name binding is available for projects with "full" TypeScript extraction enabled. This option is enabled by default when you create databases with the :ref:`CodeQL CLI `. +Static type information and global name binding is available for projects with "full" TypeScript extraction enabled. This option is enabled by default when you create databases with the CodeQL CLI. Basic usage ~~~~~~~~~~~ diff --git a/docs/codeql/codeql-overview/about-codeql.rst b/docs/codeql/codeql-overview/about-codeql.rst index a05282bf494..1392e1c7330 100644 --- a/docs/codeql/codeql-overview/about-codeql.rst +++ b/docs/codeql/codeql-overview/about-codeql.rst @@ -71,8 +71,8 @@ After you've created a CodeQL database, one or more queries are executed against it. CodeQL queries are written in a specially-designed object-oriented query language called QL. You can run the queries checked out from the CodeQL repo (or custom queries that you've written yourself) using the :ref:`CodeQL -for VS Code extension ` or the :ref:`CodeQL CLI -`. For more information about queries, see ":ref:`About CodeQL queries `." +for VS Code extension ` or the `CodeQL CLI +`__. For more information about queries, see ":ref:`About CodeQL queries `." .. _interpret-query-results: diff --git a/docs/codeql/codeql-overview/codeql-tools.rst b/docs/codeql/codeql-overview/codeql-tools.rst index d6e37c96dc7..c6df9d8882d 100644 --- a/docs/codeql/codeql-overview/codeql-tools.rst +++ b/docs/codeql/codeql-overview/codeql-tools.rst @@ -15,7 +15,7 @@ The CodeQL command-line interface (CLI) is primarily used to create databases fo security research. You can also query CodeQL databases directly from the command line or using the Visual Studio Code extension. The CodeQL CLI can be downloaded from `GitHub releases `__. -For more information, see ":ref:`CodeQL CLI `" and the `CLI changelog `__. +For more information, see "`CodeQL CLI `__" and the `CLI changelog `__. CodeQL packs ----------------------------- diff --git a/docs/codeql/ql-language-reference/ql-language-specification.rst b/docs/codeql/ql-language-reference/ql-language-specification.rst index b83558b9dd9..c52c1fd4b3f 100644 --- a/docs/codeql/ql-language-reference/ql-language-specification.rst +++ b/docs/codeql/ql-language-reference/ql-language-specification.rst @@ -74,7 +74,7 @@ added to the library path, the CodeQL packs named in its path, and the process continues until all packs have been resolved. The actual library path consists of the root directories of the selected CodeQL packs. This process depends on a mechanism for finding -CodeQL packs by pack name and version, as described in the :ref:`CodeQL CLI documentation `. +CodeQL packs by pack name and version, as described in the `CodeQL CLI documentation `__. When the query directory contains neither a ``qlpack.yml`` nor ``codeql-pack.yml`` file, it is considered to be a CodeQL pack with no name and diff --git a/docs/codeql/writing-codeql-queries/about-codeql-queries.rst b/docs/codeql/writing-codeql-queries/about-codeql-queries.rst index 3d7cc446dff..9a3957ac6a1 100644 --- a/docs/codeql/writing-codeql-queries/about-codeql-queries.rst +++ b/docs/codeql/writing-codeql-queries/about-codeql-queries.rst @@ -13,7 +13,7 @@ CodeQL includes queries to find the most relevant and interesting problems for e - **Alert queries**: queries that highlight issues in specific locations in your code. - **Path queries**: queries that describe the flow of information between a source and a sink in your code. -You can add custom queries to `CodeQL packs `__ to analyze your projects with "`Code scanning `__", use them to analyze a database with the ":ref:`CodeQL CLI `," or you can contribute to the standard CodeQL queries in our `open source repository on GitHub `__. +You can add custom queries to `CodeQL packs `__ to analyze your projects with "`Code scanning `__", use them to analyze a database with the "`CodeQL CLI `__," or you can contribute to the standard CodeQL queries in our `open source repository on GitHub `__. This topic is a basic introduction to query files. You can find more information on writing queries for specific programming languages in the ":ref:`CodeQL language guides `," and detailed technical information about QL in the ":ref:`QL language reference `." For more information on how to format your code when contributing queries to the GitHub repository, see the `CodeQL style guide `__. @@ -47,14 +47,14 @@ Query metadata Query metadata is used to identify your custom queries when they are added to the GitHub repository or used in your analysis. Metadata provides information about the query's purpose, and also specifies how to interpret and display the query results. For a full list of metadata properties, see ":doc:`Metadata for CodeQL queries `." The exact metadata requirement depends on how you are going to run your query: - If you are contributing a query to the GitHub repository, please read the `query metadata style guide `__. -- If you are analyzing a database using the :ref:`CodeQL CLI `, your query metadata must contain ``@kind``. +- If you are analyzing a database using the `CodeQL CLI `__, your query metadata must contain ``@kind``. - If you are running a query with the CodeQL extension for VS Code, metadata is not mandatory. However, if you want your results to be displayed as either an 'alert' or a 'path', you must specify the correct ``@kind`` property, as explained below. For more information, see ":ref:`Analyzing your projects `" in the CodeQL for VS Code help. .. pull-quote:: Note - Queries that are contributed to the open source repository, or used to analyze a database with the :ref:`CodeQL CLI ` must have a query type (``@kind``) specified. The ``@kind`` property indicates how to interpret and display the results of the query analysis: + Queries that are contributed to the open source repository, or used to analyze a database with the CodeQL CLI must have a query type (``@kind``) specified. The ``@kind`` property indicates how to interpret and display the results of the query analysis: - Alert query metadata must contain ``@kind problem`` to identify the results as a simple alert. - Path query metadata must contain ``@kind path-problem`` to identify the results as an alert documented by a sequence of code locations. diff --git a/docs/codeql/writing-codeql-queries/creating-path-queries.rst b/docs/codeql/writing-codeql-queries/creating-path-queries.rst index a0eec43263f..e2325ee696c 100644 --- a/docs/codeql/writing-codeql-queries/creating-path-queries.rst +++ b/docs/codeql/writing-codeql-queries/creating-path-queries.rst @@ -18,7 +18,7 @@ This topic provides information on how to structure a path query file so you can Note - The alerts generated by path queries are included in the results generated using the :ref:`CodeQL CLI ` and in `code scanning `__. You can also view the path explanations generated by your path query in the :ref:`CodeQL extension for VS Code `. + The alerts generated by path queries are included in the results generated using the `CodeQL CLI `__ and in `code scanning `__. You can also view the path explanations generated by your path query in the :ref:`CodeQL extension for VS Code `. To learn more about modeling data flow with CodeQL, see ":doc:`About data flow analysis `." diff --git a/docs/codeql/writing-codeql-queries/defining-the-results-of-a-query.rst b/docs/codeql/writing-codeql-queries/defining-the-results-of-a-query.rst index 1cf0a31289b..4e074bc411d 100644 --- a/docs/codeql/writing-codeql-queries/defining-the-results-of-a-query.rst +++ b/docs/codeql/writing-codeql-queries/defining-the-results-of-a-query.rst @@ -10,7 +10,7 @@ About query results 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. When you write your own queries in the CodeQL :ref:`extension for VS Code ` there are no constraints on what can be selected. -However, if you want to use a query to create alerts for code scanning or generate valid analysis results using the :ref:`CodeQL CLI `, you'll need to make the ``select`` statement report results in the required format. +However, if you want to use a query to create alerts for code scanning or generate valid analysis results using the `CodeQL CLI `__, you'll need to make the ``select`` statement report results in the required format. You must also ensure that the query has the appropriate metadata properties defined. This topic explains how to write your select statement to generate helpful analysis results.