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
The content of a ``qlpack.yml`` file is described in the CodeQL CLI documentation. This file
74
+
will not be recognized when using legacy tools that are not based
75
+
on the CodeQL CLI (that is, LGTM.com, LGTM Enterprise, ODASA, CodeQL for
76
+
Eclipse, and CodeQL for Visual Studio).
77
77
78
78
If both a ``queries.xml`` and a ``qlpack.yml`` exist in the same
79
-
directory the latter takes precedence (and the former is assumed to
79
+
directory, the latter takes precedence (and the former is assumed to
80
80
exist for compatibility with older tooling).
81
81
82
82
The query directory itself becomes the first element of the library
83
83
path.
84
84
85
-
In old tooling that doesn't recognize ``qlpack.yml``, the default
86
-
value of the rest of the library path is hard-coded in the tooling for
87
-
each supporting language. It contains directories within the Odasa
85
+
In legacy QL tools that don't recognize ``qlpack.yml`` files, the default
86
+
value of the rest of the library path for
87
+
each supported language is hard-coded. The tools contain directories within the ODASA
88
88
distribution that define the default CodeQL libraries for the selected
89
-
language. Which language to use depends on the ``language`` attibute
89
+
language. Which language to use depends on the ``language`` attribute
90
90
of the ``queries.xml`` file if not overridden with a ``--language``
91
-
option to Odasa.
91
+
option to the ODASA CLI.
92
92
93
-
On the other hand, the CodeQL CLI and newer tooling based on it (e.g.,
94
-
GitHub Code Scanning and the Visual Stidio Code extension for CodeQL)
95
-
constructs a default library path using QL packs. For each QL pack
96
-
added to the language path, the QL packs named in its
93
+
On the other hand, the CodeQL CLI and newer tools based on it (such as
94
+
GitHub Code Scanning and the CodeQL extension for Visual Studio Code)
95
+
construct a default library path using QL packs. For each QL pack
96
+
added to the library path, the QL packs named in its
97
97
``libraryPathDependencies`` will be subsequently added to the library
98
98
path, and the process continues until all packs have been
99
99
resolved. The actual library path consists of the root directories of
100
100
the selected QL packs. This process depends on a mechanism for finding
101
-
QL packs by pack name, as described in the CodeQL CLI documentation.
101
+
QL packs by pack name, as described in the `CodeQL CLI documentation<https://help.semmle.com/codeql/codeql-cli.html>`__.
102
102
103
103
When the query directory contains a ``queries.xml`` file but no
104
104
``qlpack.yml``, the QL pack resolution behaves as if it defines a QL
105
-
pack with no name and a single library-path dependency named
105
+
pack with no name and a single librarypath dependency named
106
106
``legacy-libraries-LANGUAGE`` where ``LANGUAGE`` is taken from
107
107
``queries.xml``. The ``github/codeql`` repository provides packs with
108
108
names following this pattern, which themselves depend on the actual
109
109
CodeQL libraries for each language.
110
110
111
-
When the query directory contains neither ``queries.xml`` nor
112
-
``qlpack.yml`` it will be considered to be a QL pack with no name and
111
+
When the query directory contains neither a ``queries.xml`` nor
112
+
``qlpack.yml`` file, it is considered to be a QL pack with no name and
113
113
no library dependencies. This causes the library path to consist of
114
-
*only* the query directory itself, which is not generally useful --
115
-
but will suffice to run toy examples of QL code that don't actually
114
+
*only* the query directory itself. This is not generally useful,
115
+
but it suffices for running toy examples of QL code that don't
116
116
use information from the database.
117
117
118
118
Name resolution
@@ -237,7 +237,7 @@ For qualified identifiers (``a.b``):
237
237
238
238
- Build up a list of *candidate search paths*, consisting of the
239
239
current file's directory, and each of the directories on the
240
-
*library path* (in order).
240
+
`library path<#library-path>`__ (in order).
241
241
242
242
- Determine the first candidate search path that has a *matching* QLL file for the import directive's qualified name. A QLL file in a candidate search path is said to match a qualified name if, starting from the candidate search path, there is a subdirectory for each successive qualifier in the qualified name, and the directory named by the final qualifier contains a file whose base name matches the qualified name's base name, with the addition of the file extension ``.qll``. The file and directory names are matched case-sensitively, regardless of whether the filesystem is case-sensitive or not.
0 commit comments