diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 374397dd..b9e4d57b 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,9 +1,5 @@ name: Full Rust codebase checks -env: - CARGO_TERM_COLOR: always - RUSTFLAGS: "-D warnings" - on: workflow_call: @@ -16,9 +12,7 @@ jobs: - run: rustup toolchain install stable --profile minimal - uses: Swatinem/rust-cache@v2 - - run: cargo check --workspace --examples --tests --benches --bins - - run: cargo fmt -- --check - - run: cargo clippy --workspace --all-targets + - run: make lint check_c_warnings: name: Check C warnings diff --git a/Makefile b/Makefile index 046f9260..ecc5a96d 100644 --- a/Makefile +++ b/Makefile @@ -76,3 +76,25 @@ clean: rm -f lib/src/*.o libtree-sitter.a libtree-sitter.$(SOEXT) libtree-sitter.$(SOEXTVER_MAJOR) libtree-sitter.$(SOEXTVER) .PHONY: all install clean + + +##### Dev targets ##### + +test: + script/fetch-fixtures + script/generate-fixtures + script/test + +test_wasm: + script/generate-fixtures-wasm + script/test-wasm + +lint: + cargo check --workspace --all-targets + cargo fmt --all --check + cargo clippy --workspace --all-targets -- -D warnings + +format: + cargo fmt --all + +.PHONY: test test_wasm lint format