mirror of
https://github.com/astral-sh/ruff
synced 2026-01-11 00:24:13 -05:00
Split off ruff_cli crate from ruff library
This lets you test the ruff linters or use the ruff library without having to compile the ~100 additional dependencies that are needed by the CLI. Because we set the following in the [workspace] section of Cargo.toml: default-members = [".", "ruff_cli"] `cargo run` still runs the CLI and `cargo test` still tests the code in src/ as well as the code in the new ruff_cli crate. (But you can now also run `cargo test -p ruff` to only test the linters.)
This commit is contained in:
committed by
Charlie Marsh
parent
403a004e03
commit
82aff5f9ec
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
@@ -60,7 +60,7 @@ jobs:
|
||||
target: wasm32-unknown-unknown
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::pedantic
|
||||
- run: cargo clippy --workspace --target wasm32-unknown-unknown --all-features -- -D warnings -W clippy::pedantic
|
||||
- run: cargo clippy -p ruff --target wasm32-unknown-unknown --all-features -- -D warnings -W clippy::pedantic
|
||||
|
||||
cargo-test:
|
||||
name: "cargo test"
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
run: |
|
||||
cargo insta test --all --delete-unreferenced-snapshots
|
||||
git diff --exit-code
|
||||
- run: cargo test --package ruff --test black_compatibility_test -- --ignored
|
||||
- run: cargo test --package ruff_cli --test black_compatibility_test -- --ignored
|
||||
|
||||
# TODO(charlie): Re-enable the `wasm-pack` tests.
|
||||
# See: https://github.com/charliermarsh/ruff/issues/1425
|
||||
|
||||
Reference in New Issue
Block a user