From 7a9b0c5afe00476b714eebcec254192d5d4e4a5a Mon Sep 17 00:00:00 2001 From: Chad Bentz <1760475+felickz@users.noreply.github.com> Date: Mon, 8 Sep 2025 11:42:19 -0400 Subject: [PATCH] add test hints for CCA --- .github/instructions/library.instructions.md | 2 ++ .github/instructions/queries.instructions.md | 2 ++ 2 files changed, 4 insertions(+) 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.