Autoformat tests

This commit is contained in:
Sauyon Lee
2020-11-10 09:35:16 -08:00
parent 235b7c0bc5
commit 80c2fcdbb8

View File

@@ -30,11 +30,11 @@ clean:
DATAFLOW_BRANCH=master
autoformat:
find ql/src -name "*.ql" -or -name "*.qll" | xargs codeql query format -qq -i
find ql -name "*.ql" -or -name "*.qll" | xargs codeql query format -qq -i
git ls-files | grep '\.go$$' | grep -v ^vendor/ | xargs grep -L "//\s*autoformat-ignore" | xargs gofmt -w
check-formatting:
find ql/src -name "*.ql" -or -name "*.qll" | xargs codeql query format --check-only
find ql -name "*.ql" -or -name "*.qll" | xargs codeql query format --check-only
test -z "$$(git ls-files | grep '\.go$$' | grep -v ^vendor/ | xargs grep -L "//\s*autoformat-ignore" | xargs gofmt -l)"
ifeq ($(QHELP_OUT_DIR),)