File tree 3 files changed +31
-1
lines changed
3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 20
20
echo "Done"
21
21
cd $HOME
22
22
echo "Downloading CodeQL CLI..."
23
- curl https://github.com/github/codeql-cli-binaries/releases/download/v2.2.5 /codeql.zip -L -o codeql.zip
23
+ curl https://github.com/github/codeql-cli-binaries/releases/download/v2.3.0 /codeql.zip -L -o codeql.zip
24
24
echo "Done"
25
25
echo "Unpacking CodeQL CLI..."
26
26
unzip -q codeql.zip
36
36
- name : Check that all QL and Go code is autoformatted
37
37
run : env PATH=$PATH:$HOME/codeql make check-formatting
38
38
39
+ - name : Compile qhelp files to markdown
40
+ run : env PATH=$PATH:$HOME/codeql QHELP_OUT_DIR=qhelp-out make qhelp-to-markdown
41
+
42
+ - name : Upload qhelp markdown
43
+ uses : actions/upload-artifact@v2
44
+ with :
45
+ name : qhelp-markdown
46
+ path : qhelp-out/**/*.md
47
+
39
48
- name : Test
40
49
run : env PATH=$PATH:$HOME/codeql make test
41
50
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ check-formatting:
37
37
find ql/src -name " *.ql" -or -name " *.qll" | xargs codeql query format --check-only
38
38
test -z " $$ (git ls-files | grep \\ .go$ | grep -v ^vendor/ | xargs grep -L " //\s * autoformat-ignore" | xargs gofmt -l)"
39
39
40
+ ifeq ($(QHELP_OUT_DIR ) ,)
41
+ # If not otherwise specified, compile qhelp to markdown in place
42
+ QHELP_OUT_DIR := ql/src
43
+ endif
44
+
45
+ qhelp-to-markdown :
46
+ scripts/qhelp-to-markdown.sh ql/src " $( QHELP_OUT_DIR) "
47
+
40
48
tools : $(addsuffix $(EXE ) ,$(addprefix tools/bin/,$(BINARIES ) ) ) tools/tokenizer.jar
41
49
42
50
.PHONY : $(addsuffix $(EXE ) ,$(addprefix tools/bin/,$(BINARIES ) ) )
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ if [ $# -ne 2 ]; then
6
+ echo " Usage: qhelp-to-markdown.sh qhelp-directory out-directory"
7
+ exit 1
8
+ fi
9
+
10
+ for qh in $( find $1 -name " *.qhelp" ) ; do
11
+ mkdir -p $2 /$( dirname $qh )
12
+ codeql generate query-help --format=markdown $qh > $2 /${qh/ qhelp/ md}
13
+ done
You can’t perform that action at this time.
0 commit comments