diff --git a/.github/instructions/library.instructions.md b/.github/instructions/library.instructions.md index 3192098..00383c0 100644 --- a/.github/instructions/library.instructions.md +++ b/.github/instructions/library.instructions.md @@ -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. diff --git a/.github/instructions/queries.instructions.md b/.github/instructions/queries.instructions.md index 3ba404f..133b848 100644 --- a/.github/instructions/queries.instructions.md +++ b/.github/instructions/queries.instructions.md @@ -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.