Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b51db7f

Browse files
committed
Include packaging in 'Using custom queries with the CodeQL CLI'.
1 parent c7731eb commit b51db7f

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

docs/codeql/codeql-cli/using-custom-queries-with-the-codeql-cli.rst

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,29 @@ For more information about these metadata properties, see ":ref:`Metadata for Co
4747
Metadata requirements may differ if you want to use your query with other
4848
applications. For more information, see ":ref:`Metadata for CodeQL queries
4949
<metadata-for-codeql-queries>`
50-
."
50+
."
51+
52+
Packaging custom QL queries
53+
---------------------------
54+
55+
When writing your own queries, you can either just save them in a custom QL pack
56+
directory or subsequently include the pack in a CodeQL package which you can
57+
then upload to the GitHub Package Registry (GHPR).
58+
59+
QL packs organize the files used in CodeQL analysis and can store queries,
60+
library files, query suites, and important metadata. Their root directory must
61+
contain a file named ``qlpack.yml``. Your custom queries should be saved in the
62+
QL pack root, or its subdirectories.
63+
64+
For each QL pack, the ``qlpack.yml`` file includes information that tells CodeQL
65+
how to compile the queries, which other CodeQL packs and libraries the pack
66+
depends on, and where to find query suite definitions. For more information
67+
about what to include in this file, see ":ref:`About QL packs <about-ql-packs>`."
68+
69+
CodeQL packages are used to create, share, depend on, and run CodeQL queries and
70+
libraries. You can publish your own CodeQL packages and download ones created by
71+
others via the the GitHub Package Registry (GHPR). For further information see
72+
":ref:`About CodeQL packs <about-codeql-packs>`."
5173

5274
Contributing to the CodeQL repository
5375
-------------------------------------

0 commit comments

Comments
 (0)