Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/instructions/library.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ Predicates such as `toString`, `getAPrimaryQlClass`, and `getAPrimaryQlModule` s

## Testing

- Follow: [Testing custom queries](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/testing-custom-queries) best practices

All tests should be stored in the `ql/tests/library-tests/` directory.
AST, CFG, and Dataflow tests should be stored in the `ql/tests/library-tests/ast`, `ql/tests/library-tests/cfg`, and `ql/tests/library-tests/dataflow` directories respectively.

Expand Down
2 changes: 2 additions & 0 deletions .github/instructions/queries.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ The documentation should include:

## Testing Query

- Follow: [Testing custom queries](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/testing-custom-queries) best practices

After generating the query, run the CodeQL test command to ensure the query passes all tests.
Use the `codeql-test` command to run the tests on the query file.

Expand Down