From f1df63657b09a664015a6ac10059c0a488f1d210 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 23 Jul 2025 10:08:51 +0000 Subject: [PATCH] Add CodeQL autoformatter instructions to copilot-instructions.md Co-authored-by: geoffw0 <40627776+geoffw0@users.noreply.github.com> --- .github/copilot-instructions.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 6621d59b7c2..3ec6170ab36 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -2,3 +2,10 @@ 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. + +When editing `.ql` and `.qll` files: +* All edited `.ql` and `.qll` files should be autoformatted afterwards using the CodeQL CLI. +* To install and use the CodeQL CLI autoformatter: + 1. Download and extract CodeQL CLI: `cd /tmp && curl -L -o codeql-linux64.zip https://github.com/github/codeql-cli-binaries/releases/latest/download/codeql-linux64.zip && unzip -q codeql-linux64.zip` + 2. Add to PATH: `export PATH="/tmp/codeql:$PATH"` + 3. Run autoformatter: `codeql query format [file] --in-place`