mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Merge pull request #6160 from timoles/patch-1
Add information for generating qhelp files locally
This commit is contained in:
@@ -110,6 +110,21 @@ 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, please ensure the `.qhelp` files are well-formed and can be generated without errors. This can be done locally with the CodeQL CLI, as shown 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
|
||||
```
|
||||
|
||||
|
||||
Please include the `.qhelp` files (and any associated code snippets) in your pull request, but do not commit the generated 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:
|
||||
|
||||
Reference in New Issue
Block a user