From 4cea019cee04787bfaf5b8cdaca06f3198074e5b Mon Sep 17 00:00:00 2001 From: james Date: Fri, 27 Nov 2020 12:26:42 +0000 Subject: [PATCH] add/improve intro text and add links to example queries --- docs/codeql/query-help/cpp.rst | 4 ++++ docs/codeql/query-help/csharp.rst | 4 ++++ docs/codeql/query-help/go.rst | 4 ++++ docs/codeql/query-help/index.rst | 10 +++++----- docs/codeql/query-help/java.rst | 4 ++++ docs/codeql/query-help/javascript.rst | 4 ++++ docs/codeql/query-help/python.rst | 4 ++++ docs/codeql/reusables/query-help-overview.rst | 5 +++++ 8 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 docs/codeql/reusables/query-help-overview.rst diff --git a/docs/codeql/query-help/cpp.rst b/docs/codeql/query-help/cpp.rst index 6240f0d4418..55dcd64ecd7 100644 --- a/docs/codeql/query-help/cpp.rst +++ b/docs/codeql/query-help/cpp.rst @@ -1,5 +1,9 @@ C and C++ query help ===================== +.. include:: ../reusables/query-help-overview.rst + +For shorter queries that you can use as building blocks when writing your own queries, see the `example queries in the CodeQL repository `__. + .. include:: toc-cpp.rst \ No newline at end of file diff --git a/docs/codeql/query-help/csharp.rst b/docs/codeql/query-help/csharp.rst index 7bc55ad7f6b..04849628d80 100644 --- a/docs/codeql/query-help/csharp.rst +++ b/docs/codeql/query-help/csharp.rst @@ -1,4 +1,8 @@ C# query help ============= +.. include:: ../reusables/query-help-overview.rst + +For shorter queries that you can use as building blocks when writing your own queries, see the `example queries in the CodeQL repository `__. + .. include:: toc-csharp.rst \ No newline at end of file diff --git a/docs/codeql/query-help/go.rst b/docs/codeql/query-help/go.rst index 6909b328443..5b2c3293698 100644 --- a/docs/codeql/query-help/go.rst +++ b/docs/codeql/query-help/go.rst @@ -1,4 +1,8 @@ Go query help ============= +.. include:: ../reusables/query-help-overview.rst + +For shorter queries that you can use as building blocks when writing your own queries, see the `example queries in the CodeQL repository `__. + .. include:: toc-go.rst \ No newline at end of file diff --git a/docs/codeql/query-help/index.rst b/docs/codeql/query-help/index.rst index 9c668c2fcb4..52112b5d073 100644 --- a/docs/codeql/query-help/index.rst +++ b/docs/codeql/query-help/index.rst @@ -1,17 +1,17 @@ CodeQL query help ----------------- -Use the sidebar to view the query help for the queries included in the "code scanning" and "security extended" query suites for a single language. +View the query help for the queries included in the ``code-scanning``, ``security-extended``, and ``security-and-quality`` query suites for the languages supported by CodeQL. -Each query help page includes: +Each query help article includes: -- A summary of key metadata for the query +- A summary of key metadata for the query. +- Information about which query suites the query is included in. - A link to the query in the `CodeQL repository `__ -- Help information to explain what potential vulnerability the query identifies and a recommendation for how to avoid introducing the problem in your code +- Help information to explain what potential vulnerability the query identifies and a recommendation for how to avoid introducing the problem to your code. .. toctree:: :titlesonly: - :hidden: cpp csharp diff --git a/docs/codeql/query-help/java.rst b/docs/codeql/query-help/java.rst index 2aaa2a20f23..315a902249a 100644 --- a/docs/codeql/query-help/java.rst +++ b/docs/codeql/query-help/java.rst @@ -1,4 +1,8 @@ Java query help =============== +.. include:: ../reusables/query-help-overview.rst + +For shorter queries that you can use as building blocks when writing your own queries, see the `example queries in the CodeQL repository `__. + .. include:: toc-java.rst \ No newline at end of file diff --git a/docs/codeql/query-help/javascript.rst b/docs/codeql/query-help/javascript.rst index 48b5a9adf17..0aa50f940e0 100644 --- a/docs/codeql/query-help/javascript.rst +++ b/docs/codeql/query-help/javascript.rst @@ -1,4 +1,8 @@ JavaScript query help ===================== +.. include:: ../reusables/query-help-overview.rst + +For shorter queries that you can use as building blocks when writing your own queries, see the `example queries in the CodeQL repository `__. + .. include:: toc-javascript.rst \ No newline at end of file diff --git a/docs/codeql/query-help/python.rst b/docs/codeql/query-help/python.rst index d71129bb318..a28c8e8d385 100644 --- a/docs/codeql/query-help/python.rst +++ b/docs/codeql/query-help/python.rst @@ -1,4 +1,8 @@ Python query help ================= +.. include:: ../reusables/query-help-overview.rst + +For shorter queries that you can use as building blocks when writing your own queries, see the `example queries in the CodeQL repository `__. + .. include:: toc-python.rst \ No newline at end of file diff --git a/docs/codeql/reusables/query-help-overview.rst b/docs/codeql/reusables/query-help-overview.rst new file mode 100644 index 00000000000..76d0d56b993 --- /dev/null +++ b/docs/codeql/reusables/query-help-overview.rst @@ -0,0 +1,5 @@ +Visit the articles below to see the documentation for the queries included in the following query suites: + +- ``code-scanning``: queries run by default in code scanning. +- ``security-extended``: queries from ``code-scanning``, plus extra security queries with slightly lower precision and severity. +- ``security-and-quality``: queries from ``code-scanning``, ``security-and-quality``, plus extra maintainability and reliability queries. \ No newline at end of file