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-ql-packs.rst
+54-23Lines changed: 54 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ The following properties are supported in ``qlpack.yml`` files.
81
81
- All packs
82
82
- A version number for this QL pack. This must be a valid semantic version that meets the `SemVer v2.0.0 specification <https://semver.org/spec/v2.0.0.html>`__.
83
83
* - ``libraryPathDependencies``
84
-
- ``codeql-javascript``
84
+
- ``codeql/javascript-all``
85
85
- Optional
86
86
- The names of any QL packs that this QL pack depends on, as a sequence. This gives the pack access to any libraries, database schema, and query suites defined in the dependency.
87
87
* - ``suites``
@@ -104,7 +104,18 @@ The following properties are supported in ``qlpack.yml`` files.
104
104
- ``.``
105
105
- Packs with upgrades
106
106
- The path to a directory within the pack that contains upgrade scripts, defined relative to the pack directory. The ``database upgrade`` action uses these scripts to update databases that were created by an older version of an extractor so they're compatible with the current extractor (see `Upgrade scripts for a language <#upgrade-scripts-for-a-language>`__ below.)
107
+
* - ``dependencies``
108
+
- .. code-block:: yaml
107
109
110
+
dependencies:
111
+
codeql/cpp-all: ^0.0.2
112
+
113
+
- Packs that define CodeQL package dependencies on other packs
114
+
- A map from pack references to the semantic version range that is compatible with this pack. Supported from CLI version v2.6.0 and onwards.
115
+
* - ``defaultSuiteFile``
116
+
- ``defaultSuiteFile: cpp-code-scanning.qls``
117
+
- Packs that export a set of default queries to run
118
+
- The path to a query suite file containing all of the queries that are run by default when this pack is passed to the ``codeql database analyze`` command. Supported from CLI version v2.6.0 and onwards.
108
119
109
120
.. _custom-ql-packs:
110
121
@@ -138,7 +149,7 @@ and libraries may contain:
138
149
libraryPathDependencies: codeql/cpp-all
139
150
suites: my-custom-suites
140
151
141
-
where ``codeql-cpp`` is the name of the QL pack for C/C++ analysis included in
152
+
where ``codeql/cpp-all`` is the name of the QL pack for C/C++ analysis included in
142
153
the CodeQL repository.
143
154
144
155
.. pull-quote::
@@ -166,54 +177,74 @@ For more information about running tests, see ":doc:`Testing custom queries
166
177
Examples of QL packs in the CodeQL repository
167
178
---------------------------------------------
168
179
169
-
Each of the languages in the CodeQL repository has three main QL packs:
180
+
Each of the languages in the CodeQL repository has four main QL packs:
170
181
171
-
- Core QL pack for the language, with the :ref:`database schema <codeql-database-schema>`
172
-
used by the language, CodeQL libraries, and queries at ``ql/<language>/ql/src``
173
-
- Tests for the core language libraries and queries pack at ``ql/<language>/ql/test``
182
+
- Core library pack for the language, with the :ref:`database schema <codeql-database-schema>`
183
+
used by the language, and CodeQL libraries, and queries at ``ql/<language>/ql/lib``
184
+
- Core query pack for the language that includes the default queries for the language, along
185
+
with their query suites at ``ql/<language>/ql/src``
186
+
- Tests for the core language libraries and queries at ``ql/<language>/ql/test``
174
187
- Upgrade scripts for the language at ``ql/<language>/upgrades``
175
188
176
-
Core QL pack
177
-
~~~~~~~~~~~~
189
+
Core library pack
190
+
~~~~~~~~~~~~~~~~~
178
191
179
-
The ``qlpack.yml`` file for a core QL pack uses the following properties:
180
-
``name``, ``version``, ``dbscheme``, and ``suites``.
192
+
The ``qlpack.yml`` file for a core library pack uses the following properties:
193
+
``name``, ``version``, ``dbscheme``.
181
194
The ``dbscheme`` property should only be defined in the core QL
182
195
pack for a language.
183
196
184
-
For example, the ``qlpack.yml`` file for `C/C++ analysis
0 commit comments