From 31627b4eb98ef7da64538c68310b48a8d4bd866a Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Wed, 22 Oct 2025 14:54:37 +0200 Subject: [PATCH] Copilot: move instructions to path-specific files This is now supported. See https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions for details. --- .github/copilot-instructions.md | 4 ---- .github/instructions/expected-files.instructions.md | 4 ++++ .github/instructions/ql-files.instructions.md | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) delete mode 100644 .github/copilot-instructions.md create mode 100644 .github/instructions/expected-files.instructions.md create mode 100644 .github/instructions/ql-files.instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md deleted file mode 100644 index 6621d59b7c2..00000000000 --- a/.github/copilot-instructions.md +++ /dev/null @@ -1,4 +0,0 @@ -When reviewing code: -* do not review changes in files with `.expected` extension (they are automatically ensured to be correct). -* in `.ql` and `.qll` files, do not try to review the code itself as you don't understand the programming language - well enough to make comments in these languages. You can still check for typos or comment improvements. diff --git a/.github/instructions/expected-files.instructions.md b/.github/instructions/expected-files.instructions.md new file mode 100644 index 00000000000..915abde678f --- /dev/null +++ b/.github/instructions/expected-files.instructions.md @@ -0,0 +1,4 @@ +--- +applyTo: "**/*.expected" +--- +Ignore these files. These are generated to be correct by running the tests, and should not be edited by an agent. diff --git a/.github/instructions/ql-files.instructions.md b/.github/instructions/ql-files.instructions.md new file mode 100644 index 00000000000..4d331807e06 --- /dev/null +++ b/.github/instructions/ql-files.instructions.md @@ -0,0 +1,6 @@ +--- +applyTo: "**/*.ql,**/*.qll" +--- +When reviewing these QL files, do not make any comment on the code itself. You don't understand the QL programming language well enough yet. You can only make comments about the following aspects: +* comments (lines starting with `//` or block comments enclosed in `/* ... */`): you can suggest improvements to the clarity of comments, or point out spelling mistakes +* typos in identifiers