Use upstream tree-sitter-ql

This gets rid of all of the `dbscheme` and YAML bits. These will be
added in later commits. (Doing it all in one go made for an unreadable
diff.)

Also modifies `create-extractor-path.sh` to automatically install
`gh codeql` if there is no CodeQL CLI available for autoformatting.
This commit is contained in:
Taus
2022-07-22 12:58:03 +00:00
committed by erik-krogh
parent 2ee1979546
commit 495576c438
5 changed files with 37 additions and 530 deletions

View File

@@ -10,10 +10,19 @@ else
exit 1
fi
if which codeql >/dev/null; then
CODEQL_BINARY="codeql"
elif gh codeql >/dev/null; then
CODEQL_BINARY="gh codeql"
else
gh extension install github/gh-codeql
CODEQL_BINARY="gh codeql"
fi
cargo build --release
cargo run --release -p ql-generator -- --dbscheme ql/src/ql.dbscheme --library ql/src/codeql_ql/ast/internal/TreeSitter.qll
codeql query format -i ql/src/codeql_ql/ast/internal/TreeSitter.qll
$CODEQL_BINARY query format -i ql/src/codeql_ql/ast/internal/TreeSitter.qll
rm -rf extractor-pack
mkdir -p extractor-pack