From b212af08a6cffbb434f3c8a2795a579e092792fd Mon Sep 17 00:00:00 2001 From: Shati Patel <42641846+shati-patel@users.noreply.github.com> Date: Fri, 14 Aug 2020 11:47:53 +0100 Subject: [PATCH] Docs: Rename default branch --- README.md | 2 +- docs/language/README.rst | 2 +- .../writing-queries/introduction-to-queries.rst | 12 ++++++------ .../language/learn-ql/writing-queries/query-help.rst | 12 ++++++------ .../learn-ql/writing-queries/query-metadata.rst | 4 ++-- .../language/ql-training/java/apache-struts-java.rst | 2 +- .../ql-training/java/global-data-flow-java.rst | 2 +- .../slide-snippets/abstract-syntax-tree.rst | 6 +++--- docs/language/reusables/cpp-further-reading.rst | 4 ++-- docs/language/reusables/csharp-further-reading.rst | 4 ++-- docs/language/reusables/go-further-reading.rst | 4 ++-- docs/language/reusables/java-further-reading.rst | 4 ++-- .../reusables/javascript-further-reading.rst | 4 ++-- docs/language/reusables/python-further-reading.rst | 4 ++-- docs/query-metadata-style-guide.md | 2 +- 15 files changed, 34 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 08e572a0246..9012e83f10d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ You can use the [interactive query console](https://lgtm.com/help/lgtm/using-que ## Contributing -We welcome contributions to our standard library and standard checks. Do you have an idea for a new check, or how to improve an existing query? Then please go ahead and open a pull request! Before you do, though, please take the time to read our [contributing guidelines](CONTRIBUTING.md). You can also consult our [style guides](https://github.com/github/codeql/tree/master/docs) to learn how to format your code for consistency and clarity, how to write query metadata, and how to write query help documentation for your query. +We welcome contributions to our standard library and standard checks. Do you have an idea for a new check, or how to improve an existing query? Then please go ahead and open a pull request! Before you do, though, please take the time to read our [contributing guidelines](CONTRIBUTING.md). You can also consult our [style guides](https://github.com/github/codeql/tree/main/docs) to learn how to format your code for consistency and clarity, how to write query metadata, and how to write query help documentation for your query. ## License diff --git a/docs/language/README.rst b/docs/language/README.rst index 55232361199..d47dc641b4d 100644 --- a/docs/language/README.rst +++ b/docs/language/README.rst @@ -103,7 +103,7 @@ generates html slide shows in the ```` directory when run from the ``ql-training`` source directory. For more information about creating slides for QL training and variant analysis -examples, see the `template slide deck `__. +examples, see the `template slide deck `__. Viewing the current version of the CodeQL documentation ******************************************************* diff --git a/docs/language/learn-ql/writing-queries/introduction-to-queries.rst b/docs/language/learn-ql/writing-queries/introduction-to-queries.rst index c42c26d0c8f..a0ceb4963ca 100644 --- a/docs/language/learn-ql/writing-queries/introduction-to-queries.rst +++ b/docs/language/learn-ql/writing-queries/introduction-to-queries.rst @@ -14,7 +14,7 @@ CodeQL includes queries to find the most relevant and interesting problems for e You can add custom queries to `custom query packs `__ to analyze your projects in `LGTM `__, 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 `here `__, and detailed technical information about QL in the `QL language reference `__. -For more information on how to format your code when contributing queries to the GitHub repository, see the `CodeQL style guide `__. +For more information on how to format your code when contributing queries to the GitHub repository, see the `CodeQL style guide `__. Basic query structure ********************* @@ -42,7 +42,7 @@ 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 contributing a query to the GitHub repository, please read the `query metadata style guide `__. - If you are adding a custom query to a query pack for analysis using LGTM , see `Writing custom queries to include in LGTM analysis `__. - If you are analyzing a database using the `CodeQL CLI `__, your query metadata must contain ``@kind``. - If you are running a query in the query console on LGTM or 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 `Using the query console `__ on LGTM.com and "`Analyzing your projects `__" in the CodeQL for VS Code help. @@ -120,15 +120,15 @@ You can also find examples of queries developed to find security vulnerabilities Contributing queries ******************** -Contributions to the standard queries and libraries are very welcome. For more information, see our `contributing guidelines `__. +Contributions to the standard queries and libraries are very welcome. For more information, see our `contributing guidelines `__. If you are contributing a query to the open source GitHub repository, writing a custom query for LGTM, or using a custom query in an analysis with the CodeQL CLI, then you need to include extra metadata in your query to ensure that the query results are interpreted and displayed correctly. See the following topics for more information on query metadata: - ":doc:`Metadata for CodeQL queries `" -- `Query metadata style guide on GitHub `__ +- `Query metadata style guide on GitHub `__ -Query contributions to the open source GitHub repository may also have an accompanying query help file to provide information about their purpose for other users. For more information on writing query help, see the `Query help style guide on GitHub `__ and the ":doc:`Query help files `." +Query contributions to the open source GitHub repository may also have an accompanying query help file to provide information about their purpose for other users. For more information on writing query help, see the `Query help style guide on GitHub `__ and the ":doc:`Query help files `." Query help files **************** -When you write a custom query, we also recommend that you write a query help file to explain the purpose of the query to other users. For more information, see the `Query help style guide `__ on GitHub, and the ":doc:`Query help files `." +When you write a custom query, we also recommend that you write a query help file to explain the purpose of the query to other users. For more information, see the `Query help style guide `__ on GitHub, and the ":doc:`Query help files `." diff --git a/docs/language/learn-ql/writing-queries/query-help.rst b/docs/language/learn-ql/writing-queries/query-help.rst index 21e062ba82e..df33c64ffdc 100644 --- a/docs/language/learn-ql/writing-queries/query-help.rst +++ b/docs/language/learn-ql/writing-queries/query-help.rst @@ -4,7 +4,7 @@ Query help files Query help files tell users the purpose of a query, and recommend how to solve the potential problem the query finds. This topic provides detailed information on the structure of query help files. -For more information about how to write useful query help in a style that is consistent with the standard CodeQL queries, see the `Query help style guide `__ on GitHub. +For more information about how to write useful query help in a style that is consistent with the standard CodeQL queries, see the `Query help style guide `__ on GitHub. .. pull-quote:: @@ -13,7 +13,7 @@ For more information about how to write useful query help in a style that is con You can access the query help for CodeQL queries by visiting the `Built-in query pages `__. You can also access the raw query help files in the `GitHub repository `__. - For example, see the `JavaScript security queries `__ and `C/C++ critical queries `__. + For example, see the `JavaScript security queries `__ and `C/C++ critical queries `__. For queries run by default on LGTM, there are several different ways to access the query help. For further information, see `Where do I see the query help for a query on LGTM? `__ in the LGTM user help. @@ -169,7 +169,7 @@ The ``include`` element can be used as a section or block element. The content o Section-level include elements ------------------------------ -Section-level ``include`` elements can be located beneath the top-level ``qhelp`` element. For example, in `StoredXSS.qhelp `__, a full query help file is reused: +Section-level ``include`` elements can be located beneath the top-level ``qhelp`` element. For example, in `StoredXSS.qhelp `__, a full query help file is reused: .. code-block:: xml @@ -177,12 +177,12 @@ Section-level ``include`` elements can be located beneath the top-level ``qhelp` -In this example, the `XSS.qhelp `__ file must conform to the standard for a full query help file as described above. That is, the ``qhelp`` element may only contain non-``fragment``, section-level elements. +In this example, the `XSS.qhelp `__ file must conform to the standard for a full query help file as described above. That is, the ``qhelp`` element may only contain non-``fragment``, section-level elements. Block-level include elements ---------------------------- -Block-level ``include`` elements can be included beneath section-level elements. For example, an ``include`` element is used beneath the ``overview`` section in `ThreadUnsafeICryptoTransform.qhelp `__: +Block-level ``include`` elements can be included beneath section-level elements. For example, an ``include`` element is used beneath the ``overview`` section in `ThreadUnsafeICryptoTransform.qhelp `__: .. code-block:: xml @@ -193,7 +193,7 @@ Block-level ``include`` elements can be included beneath section-level elements. ... -The included file, `ThreadUnsafeICryptoTransformOverview.qhelp `_, may only contain one or more ``fragment`` sections. For example: +The included file, `ThreadUnsafeICryptoTransformOverview.qhelp `_, may only contain one or more ``fragment`` sections. For example: .. code-block:: xml diff --git a/docs/language/learn-ql/writing-queries/query-metadata.rst b/docs/language/learn-ql/writing-queries/query-metadata.rst index 34f108ad04a..a50c4f183cb 100644 --- a/docs/language/learn-ql/writing-queries/query-metadata.rst +++ b/docs/language/learn-ql/writing-queries/query-metadata.rst @@ -8,7 +8,7 @@ About query metadata 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. This metadata tells LGTM and the CodeQL `extension for VS Code `__ how to handle the query and display its results correctly. -It also gives other users information about what the query results mean. For more information on query metadata, see the `query metadata style guide `__ in our `open source repository `__ on GitHub. +It also gives other users information about what the query results mean. For more information on query metadata, see the `query metadata style guide `__ in our `open source repository `__ on GitHub. .. pull-quote:: @@ -34,7 +34,7 @@ The following properties are supported by all query files: | ``@name`` | ```` | A statement that defines the label of the query. The name is written in plain text, and uses single quotes (``'``) to enclose code elements. | +-----------------------+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``@tags`` | | ``correctness`` | These tags group queries together in broad categories to make it easier to search for them and identify them. In addition to the common tags listed here, there are also a number of more specific categories. For more information, see the | -| | | ``maintainability`` | `Query metadata style guide `__. | +| | | ``maintainability`` | `Query metadata style guide `__. | | | | ``readability`` | | | | | ``security`` | | +-----------------------+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/docs/language/ql-training/java/apache-struts-java.rst b/docs/language/ql-training/java/apache-struts-java.rst index 67864699673..670e9066dc8 100644 --- a/docs/language/ql-training/java/apache-struts-java.rst +++ b/docs/language/ql-training/java/apache-struts-java.rst @@ -134,4 +134,4 @@ Model answer, step 4 and sink.getNode() instanceof UnsafeDeserializationSink select sink.getNode().(UnsafeDeserializationSink).getMethodAccess(), source, sink, "Unsafe deserialization of $@.", source, "user input" -More full-featured version: https://github.com/github/security-lab/tree/master/CodeQL_Queries/java/Apache_Struts_CVE-2017-9805 \ No newline at end of file +More full-featured version: https://github.com/github/security-lab/tree/main/CodeQL_Queries/java/Apache_Struts_CVE-2017-9805 \ No newline at end of file diff --git a/docs/language/ql-training/java/global-data-flow-java.rst b/docs/language/ql-training/java/global-data-flow-java.rst index 9d18083c66b..3e5029a754f 100644 --- a/docs/language/ql-training/java/global-data-flow-java.rst +++ b/docs/language/ql-training/java/global-data-flow-java.rst @@ -54,7 +54,7 @@ Code injection in Apache struts .. note:: More details on the CVE can be found here: https://securitylab.github.com/research/apache-struts-CVE-2018-11776 and - https://github.com/github/security-lab/tree/master/CodeQL_Queries/java/Apache_Struts_CVE-2018-11776 + https://github.com/github/security-lab/tree/main/CodeQL_Queries/java/Apache_Struts_CVE-2018-11776 More details on OGNL can be found here: https://commons.apache.org/proper/commons-ognl/ diff --git a/docs/language/ql-training/slide-snippets/abstract-syntax-tree.rst b/docs/language/ql-training/slide-snippets/abstract-syntax-tree.rst index b16aaa72376..09b8cf86a01 100644 --- a/docs/language/ql-training/slide-snippets/abstract-syntax-tree.rst +++ b/docs/language/ql-training/slide-snippets/abstract-syntax-tree.rst @@ -65,6 +65,6 @@ Entity types are rarely used directly, the usual pattern is to define a class th For example, the database schemas for C/++, C#, and Java CodeQL databases are here: - - https://github.com/github/codeql/blob/master/cpp/ql/src/semmlecode.cpp.dbscheme - - https://github.com/github/codeql/blob/master/csharp/ql/src/semmlecode.csharp.dbscheme - - https://github.com/github/codeql/blob/master/java/ql/src/config/semmlecode.dbscheme \ No newline at end of file + - https://github.com/github/codeql/blob/main/cpp/ql/src/semmlecode.cpp.dbscheme + - https://github.com/github/codeql/blob/main/csharp/ql/src/semmlecode.csharp.dbscheme + - https://github.com/github/codeql/blob/main/java/ql/src/config/semmlecode.dbscheme \ No newline at end of file diff --git a/docs/language/reusables/cpp-further-reading.rst b/docs/language/reusables/cpp-further-reading.rst index 9c68386c0fa..5cd69858578 100644 --- a/docs/language/reusables/cpp-further-reading.rst +++ b/docs/language/reusables/cpp-further-reading.rst @@ -1,4 +1,4 @@ -- `CodeQL queries for C and C++ `__ -- `Example queries for C and C++ `__ +- `CodeQL queries for C and C++ `__ +- `Example queries for C and C++ `__ - `CodeQL library reference for C and C++ `__ diff --git a/docs/language/reusables/csharp-further-reading.rst b/docs/language/reusables/csharp-further-reading.rst index eff3327b69d..1b5cb7754c0 100644 --- a/docs/language/reusables/csharp-further-reading.rst +++ b/docs/language/reusables/csharp-further-reading.rst @@ -1,4 +1,4 @@ -- `CodeQL queries for C# `__ -- `Example queries for C# `__ +- `CodeQL queries for C# `__ +- `Example queries for C# `__ - `CodeQL library reference for C# `__ diff --git a/docs/language/reusables/go-further-reading.rst b/docs/language/reusables/go-further-reading.rst index a624bcfd7ce..59f3625bc42 100644 --- a/docs/language/reusables/go-further-reading.rst +++ b/docs/language/reusables/go-further-reading.rst @@ -1,3 +1,3 @@ -- `CodeQL queries for Go `__ -- `Example queries for Go `__ +- `CodeQL queries for Go `__ +- `Example queries for Go `__ - `CodeQL library reference for Go `__ diff --git a/docs/language/reusables/java-further-reading.rst b/docs/language/reusables/java-further-reading.rst index 16afdcbf790..4f94a78099b 100644 --- a/docs/language/reusables/java-further-reading.rst +++ b/docs/language/reusables/java-further-reading.rst @@ -1,4 +1,4 @@ -- `CodeQL queries for Java `__ -- `Example queries for Java `__ +- `CodeQL queries for Java `__ +- `Example queries for Java `__ - `CodeQL library reference for Java `__ diff --git a/docs/language/reusables/javascript-further-reading.rst b/docs/language/reusables/javascript-further-reading.rst index 12321f6a539..bda3e058a1b 100644 --- a/docs/language/reusables/javascript-further-reading.rst +++ b/docs/language/reusables/javascript-further-reading.rst @@ -1,3 +1,3 @@ -- `CodeQL queries for JavaScript `__ -- `Example queries for JavaScript `__ +- `CodeQL queries for JavaScript `__ +- `Example queries for JavaScript `__ - `CodeQL library reference for JavaScript `__ diff --git a/docs/language/reusables/python-further-reading.rst b/docs/language/reusables/python-further-reading.rst index 8a6eb162066..7ff521c4abf 100644 --- a/docs/language/reusables/python-further-reading.rst +++ b/docs/language/reusables/python-further-reading.rst @@ -1,4 +1,4 @@ -- `CodeQL queries for Python `__ -- `Example queries for Python `__ +- `CodeQL queries for Python `__ +- `Example queries for Python `__ - `CodeQL library reference for Python `__ diff --git a/docs/query-metadata-style-guide.md b/docs/query-metadata-style-guide.md index 1311a808e3a..e029339c1af 100644 --- a/docs/query-metadata-style-guide.md +++ b/docs/query-metadata-style-guide.md @@ -12,7 +12,7 @@ Query files have the extension `.ql`. Each file has two distinct areas: * Query definition–defined using QL. The query includes a select statement, which defines the content and format of the results. For further information about writing QL, see the following topics: * [Learning CodeQL](https://help.semmle.com/QL/learn-ql/index.html) * [QL language reference](https://help.semmle.com/QL/ql-handbook/index.html) - * [CodeQL style guide](https://github.com/github/codeql/blob/master/docs/ql-style-guide.md) + * [CodeQL style guide](https://github.com/github/codeql/blob/main/docs/ql-style-guide.md) For examples of query files for the languages supported by CodeQL, visit the following links: