Skip to content

Commit f1df636

Browse files
Copilotgeoffw0
andcommitted
Add CodeQL autoformatter instructions to copilot-instructions.md
Co-authored-by: geoffw0 <40627776+geoffw0@users.noreply.github.com>
1 parent 2cc732e commit f1df636

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/copilot-instructions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,10 @@ When reviewing code:
22
* do not review changes in files with `.expected` extension (they are automatically ensured to be correct).
33
* in `.ql` and `.qll` files, do not try to review the code itself as you don't understand the programming language
44
well enough to make comments in these languages. You can still check for typos or comment improvements.
5+
6+
When editing `.ql` and `.qll` files:
7+
* All edited `.ql` and `.qll` files should be autoformatted afterwards using the CodeQL CLI.
8+
* To install and use the CodeQL CLI autoformatter:
9+
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`
10+
2. Add to PATH: `export PATH="/tmp/codeql:$PATH"`
11+
3. Run autoformatter: `codeql query format [file] --in-place`

0 commit comments

Comments
 (0)