Added chapter about generating qhelp files locally

This commit is contained in:
Timo Müller
2021-06-25 15:48:27 +02:00
committed by GitHub
parent 2d24387e9e
commit d1a4f57342

View File

@@ -110,6 +110,18 @@ For example:
If your query checks code for a CWE weakness, you should use the `@tags` element in the query file to reference the associated CWEs, as explained [here](query-metadata-style-guide.md). When you use these tags, a link to the appropriate entry from the [MITRE.org](https://cwe.mitre.org/scoring/index.html) site will automatically appear as a reference in the output HTML file.
## Validating qhelp files
Before making a pull request you should ensure the `.qhelp` file is well-formed and can be generated without problems. For example, this can be done locally with `codeql-cli` tool. In order to do so just start the `codeql-cli` with the appropriate parameters, as seen in the following example:
```bash
# codeql generate query-help <path_to_your_qhelp_file> --format=<format>
# For example:
codeql generate query-help ./myCustomQuery.qhelp --format=markdown
```
More information on how to test your `.qhelp` files can be found [within the documentation](https://codeql.github.com/docs/codeql-cli/testing-query-help-files/)
## Query help example
The following example is a query help file for a query from the standard query suite for Java: