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-workspaces.rst
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ In most cases, you should store the CodeQL workspace and the CodeQL packs contai
14
14
The ``codeql-workspace.yml`` file
15
15
--------------------------------
16
16
17
-
A CodeQL workspace is defined by a ``codeql-workspace.yml`` yaml file. This file contains a ``provide`` block, and optionally an ``ignore`` block.
17
+
A CodeQL workspace is defined by a ``codeql-workspace.yml`` yaml file. This file contains a ``provide`` block, and optionally an ``ignore`` block.
18
18
19
-
* The ``provide`` block contains a list of glob patterns that define the CodeQL packs that are available in the workspace.
20
-
* The ``ignore`` block contains a list of glob patterns that define CodeQL packs that are not available in the workspace.
19
+
* The ``provide`` block contains a list of glob patterns that define the CodeQL packs that are available in the workspace.
20
+
* The ``ignore`` block contains a list of glob patterns that define CodeQL packs that are not available in the workspace.
21
21
22
22
Each entry in the ``provide`` or ``ignore`` section must map to the location of a ``qlpack.yml`` file. All glob patterns are defined relative to the directory that contains the workspace file. For a list of patterns accepted in this file, see" `@actions/glob <https://github.com/actions/toolkit/tree/main/packages/glob#patterns>`__ .
23
23
@@ -30,7 +30,7 @@ For example, the following ``codeql-workspace.yml`` file defines a workspace tha
30
30
ignore:
31
31
- "*/codeql-packs/**/experimental/**/qlpack.yml"
32
32
33
-
To verify that you have the correct ``codeql-workspace.yml`` file, run ``codeql pack ls`` command in the same directory as your workspace. The result of the command is a list of all CodeQL packs in the workspace.
33
+
To verify that your ``codeql-workspace.yml`` file includes the CodeQL packs that you expect, run ``codeql pack ls`` command in the same directory as your workspace. The result of the command is a list of all CodeQL packs in the workspace.
34
34
35
35
36
36
CodeQL workspaces and query resolution
@@ -46,7 +46,12 @@ This ensures that any local changes you make to a query library in a dependency
46
46
47
47
Note
48
48
49
-
Source dependencies are CodeQL packs that are resolved from the filesystem. They might be in the same CodeQL workspace, or specified as a path option in the ``--additional-packs`` argument. Source dependencies override any dependencies found in the local package cache and version constraints are ignored. This ensures that during local development version mismatches can be ignored.
49
+
Source dependencies are CodeQL packs that are resolved from the local file system. These dependencies can be in the same CodeQL workspace, or specified as a path option using the ``--additional-packs`` argument. When you compile and run queries locally, source dependencies override any dependencies found in the local package cache as well as version constraints defined in the ``qlpack.yml``.
50
+
51
+
This is particularly useful in the following situations:
52
+
53
+
- One of the dependencies of the query pack you are running is not yet published. Resolving from source is the only way to refernce that pack.
54
+
- You are making changes to multiple packs at the same time and want to test them together. Resolving from source ensures that you are using the version of the pack with your changes in it.
0 commit comments