| title | Testing query help files | ||||||
|---|---|---|---|---|---|---|---|
| shortTitle | Test query help files | ||||||
| intro | Ensure your {% data variables.product.prodname_codeql %} query help files are valid by previewing them as Markdown. | ||||||
| product | {% data reusables.gated-features.codeql %} | ||||||
| versions |
|
||||||
| redirect_from |
|
||||||
| contentType | how-tos | ||||||
| category |
|
- The query help (
.qhelp) files must have accompanying query (.ql) files with identical base names. - The query help files should follow the standard structure and style for query help documentation. For more information, see the Query help style guide in the {% data variables.product.prodname_codeql %} repository.
-
To render your query help files as Markdown, run the following command:
codeql generate query-help <qhelp|query|dir|suite> --format=markdown [--output=<dir|file>]
For information on the options available for this command, see AUTOTITLE.
-
If you receive any warning messages, review and fix them, then rerun the command. By default, the {% data variables.product.prodname_codeql_cli %} will print a warning message if:
- Any of the query help is invalid
- Any
.qhelpfiles specified in the command don’t have the same base name as an accompanying.qlfile - Any
.qlfiles specified in the command don’t have the same base name as an accompanying.qhelpfile
-
Review the rendered Markdown in your output directory, file, or terminal to check that your files appear as expected.