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
| 0.30.0 | 2023-11-14 | Remco Vermeulen | Clarify release steps in case of a hotfix release. |
41
+
| 0.31.0 | 2024-02-23 | Remco Vermeulen | Clarify the required use of Python version 3.9 |
41
42
42
43
## Scope of work
43
44
@@ -163,6 +164,7 @@ These files will be ready for query implementation.
163
164
164
165
#### Step 0: Prepare the Python environment
165
166
167
+
The tooling standardizes on Python 3.9 and requires the use of version 3.9 to run all tooling.
166
168
The `scripts` directory contains the pip package specification file `requirements.txt` that contains the dependencies our generation scripts rely upon.
167
169
168
170
The dependencies can be installed as follows:
@@ -171,12 +173,12 @@ The dependencies can be installed as follows:
171
173
pip3.9 install -r scripts/requirements.txt
172
174
```
173
175
174
-
It is advisable to use a Python virtual environment which needs to be created and activated before installing the dependencies. This can be done as follows:
176
+
It is advisable to use a Python 3.9 virtual environment which needs to be created and activated before installing the dependencies. This can be done as follows:
@@ -265,7 +267,7 @@ The `generate_package_description.py` script provides a "best-effort" approach t
265
267
- `performance` - if the query identifies an issue which has a negative impact on the performance of the code.
266
268
- `concurrency` - if the query identifies a concurrency issue.
267
269
- Validate the rule package description file using the `validate-rule-package.py` script that validates the rule package descriptions against the schema `rule-package.schema.json` located in the `schemas` directory.
@@ -350,7 +352,7 @@ All public predicates, classes, modules and files should be documented with QLDo
350
352
351
353
### Installing QL dependencies
352
354
353
-
All of our query and library packs depend on the standard CodeQL library for C++, `codeql/cpp-all`. This dependency is specified in the `qlpack.yml` file for each of our packs. Before compiling, running, or testing any of our queries or libraries, you must download the proper dependencies by running `python3 scripts/install-packs.py`. This will download the appropriate version of the standard library from the public package registry, installing it in a cache in your `~/.codeql` directory. When compiling queries or running tests, the QL compiler will pick up the appropriate dependencies from this cache without any need to specify an additional library search path on the command line.
355
+
All of our query and library packs depend on the standard CodeQL library for C++, `codeql/cpp-all`. This dependency is specified in the `qlpack.yml` file for each of our packs. Before compiling, running, or testing any of our queries or libraries, you must download the proper dependencies by running `python3.9 scripts/install-packs.py`. This will download the appropriate version of the standard library from the public package registry, installing it in a cache in your `~/.codeql` directory. When compiling queries or running tests, the QL compiler will pick up the appropriate dependencies from this cache without any need to specify an additional library search path on the command line.
354
356
355
357
Because the downloaded packs are cached, it is only necessary to run `install-packs.py` once each time we upgrade to a new standard library version. It does not hurt to run it more often; if all necessary packs are already in the download cache, then it will complete quickly without trying to download anything.
This will produce a directory (`<output_directory>`) containing the following report files in markdown format:
@@ -325,6 +326,7 @@ The example describes three ways of scoping a deviation:
325
326
326
327
The activation of the deviation mechanism requires an extra step in the database creation process.
327
328
This extra step is the invocation of the Python script `path/to/codeql-coding-standards/scripts/configuration/process_coding_standards_config.py` that is part of the coding standards code scanning pack.
329
+
To run this script, a Python interpreter version 3.9 must be available on the system path.
The `process_coding_standards_config.py` has a dependency on the package `pyyaml` that can be installed using the provided PIP package manifest by running the following command:
The `recategorize.py` scripts has a dependencies on the following Python packages that can be installed with the command `pip install -r path/to/codeql-coding-standards/scripts/guideline_recategorization/requirements.txt`:
0 commit comments