This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed
Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 2020 echo "Done"
2121 cd $HOME
2222 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
2424 echo "Done"
2525 echo "Unpacking CodeQL CLI..."
2626 unzip -q codeql.zip
3636 - name : Check that all QL and Go code is autoformatted
3737 run : env PATH=$PATH:$HOME/codeql make check-formatting
3838
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+
3948 - name : Test
4049 run : env PATH=$PATH:$HOME/codeql make test
4150
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ check-formatting:
3737 find ql/src -name " *.ql" -or -name " *.qll" | xargs codeql query format --check-only
3838 test -z " $$ (git ls-files | grep \\ .go$ | grep -v ^vendor/ | xargs grep -L " //\s * autoformat-ignore" | xargs gofmt -l)"
3939
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+
4048tools : $(addsuffix $(EXE ) ,$(addprefix tools/bin/,$(BINARIES ) ) ) tools/tokenizer.jar
4149
4250.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