You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/codeql/codeql-cli/about-codeql-packs.rst
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ You can use the package management commands in the CodeQL CLI to create CodeQL p
16
16
17
17
18
18
The standard CodeQL packages for all supported languages are published in the `GitHub Container registry <https://github.com/orgs/codeql/packages>`__.
19
-
The `CodeQL repository <https://github.com/github/codeql>`__ contains sources for the standard CodeQL packs for all supported languages.
19
+
The `CodeQL repository <https://github.com/github/codeql>`__ contains source files for the standard CodeQL packs for all supported languages.
20
20
21
21
.. _codeql-pack-structure:
22
22
@@ -38,13 +38,13 @@ When executing query-related commands, CodeQL first looks in siblings of the ins
38
38
Then it checks the package cache for CodeQL packs which have been downloaded. This means that when you are developing queries locally, the local packages
39
39
in the installation directory override packages of the same name in the package cache, so that you can test your local changes.
40
40
41
-
The metadata in each `qlpack.yml`` file tells
41
+
The metadata in each ``qlpack.yml`` file tells
42
42
CodeQL how to compile any queries in the pack, what libraries the pack depends on, and where to
43
43
find query suite definitions.
44
44
45
45
The contents of the CodeQL pack (queries or libraries used in CodeQL analysis) is included in the same directory as ``qlpack.yml``, or its subdirectories.
46
46
47
-
The directory containing the ``qlpack.yml`` file serves as the root directory for the content of the CodeQL pack. That is, for all ``.ql`` and ``.qll`` files in the pack, CodeQL will resolve all import statements relative to the directory containing ``qlpack.yml`` at the pack's root.
47
+
The directory containing the ``qlpack.yml`` file serves as the root directory for the content of the CodeQL pack. That is, for all ``.ql`` and ``.qll`` files in the pack, CodeQL will resolve all import statements relative to the directory containing the ``qlpack.yml`` file at the pack's root.
48
48
49
49
.. _codeqlpack-yml-properties:
50
50
@@ -141,7 +141,7 @@ The following properties are supported in ``qlpack.yml`` files.
141
141
upgrades: .
142
142
143
143
- Core language packs only
144
-
- The path to a directory within the pack that contains database upgrade scripts, defined relative to the pack directory. Database upgrades are used internally to ensure a database created with a different version of the CodeQL CLI is compatible with the current version.
144
+
- The path to a directory within the pack that contains database upgrade scripts, defined relative to the pack directory. Database upgrades are used internally to ensure that a database created with a different version of the CodeQL CLI is compatible with the current version of the CLI.
145
145
* - ``authors``
146
146
- .. code-block:: yaml
147
147
@@ -212,7 +212,7 @@ In most cases, the ``codeql-pack.lock.yml`` file is only relevant for query pack
212
212
Examples of custom CodeQL packs
213
213
-------------------------------
214
214
215
-
When you write custom queries or tests, you should save them in custom CodeQL packs. For simplicity, try to organize each pack logically. For more information, see ""`CodeQL pack structure <#codeql-pack-structure>`__." Save files for queries and tests in separate packs and, where possible, organize custom packs into specific folders for each target language. This is particuarly useful if you intend to publish your CodeQL packs so they can be shared with others or used in GitHub `Code scanning <https://docs.github.com/en/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning>`__.
215
+
When you write custom queries or tests, you should save them in custom CodeQL packs. For simplicity, try to organize each pack logically. For more information, see "`CodeQL pack structure <#codeql-pack-structure>`__." Save files for queries and tests in separate packs and, where possible, organize custom packs into specific folders for each target language. This is particuarly useful if you intend to publish your CodeQL packs so they can be shared with others or used in GitHub `Code scanning <https://docs.github.com/en/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning>`__.
Copy file name to clipboardExpand all lines: docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
+2-8Lines changed: 2 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -58,8 +58,8 @@ You can also specify:
58
58
- a path to a directory containing query files
59
59
- a path to a query suite file
60
60
- the name of a CodeQL query pack
61
-
- with an optional version range
62
-
- with an optional path to a query, directory, or query suite inside the pack
61
+
- with an optional version range
62
+
- with an optional path to a query, directory, or query suite inside the pack
63
63
64
64
If omitted, the default query suite for the language of the database being analyzed will be used. For more information, see the :ref:`examples <database-analyze-examples>` below.
65
65
@@ -166,12 +166,6 @@ For example, to execute all Python queries contained in the ``Functions`` direct
Copy file name to clipboardExpand all lines: docs/codeql/reusables/test-qlpack.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,4 +6,4 @@
6
6
extractor: java
7
7
tests: .
8
8
9
-
This ``qlpack.yml`` file states that ``my-github-user/my-query-tests`` depends on ``my-github-user/my-custom-queries`` at a version greater than or equal to 1.2.3 and less than 2.0.0. It also declares that the CLI should use the Java ``extractor`` when creating test databases. The ``tests: .`` line declares that all ``.ql`` files in the pack should be run as tests when ``codeql test run`` is run with the ``--strict-test-discovery`` option. Typically, test packs do not contain a ``version`` property. This prevents them from being inadvertently published.
9
+
This ``qlpack.yml`` file states that ``my-github-user/my-query-tests`` depends on ``my-github-user/my-custom-queries`` at a version greater than or equal to 1.2.3 and less than 2.0.0. It also declares that the CLI should use the Java ``extractor`` when creating test databases. The ``tests: .`` line declares that all ``.ql`` files in the pack should be run as tests when ``codeql test run`` is run with the ``--strict-test-discovery`` option. Typically, test packs do not contain a ``version`` property. This prevents you from accidentally publishing them.
0 commit comments