mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:41:23 +00:00
Filter out test rules in RuleSelector
JSON schema (#9901)
This commit is contained in:
parent
fe7d965334
commit
49c5e715f9
2 changed files with 10 additions and 4 deletions
5
.github/workflows/ci.yaml
vendored
5
.github/workflows/ci.yaml
vendored
|
@ -117,10 +117,7 @@ jobs:
|
||||||
tool: cargo-insta
|
tool: cargo-insta
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
run: cargo insta test --all --exclude ruff_dev --all-features --unreferenced reject
|
run: cargo insta test --all --all-features --unreferenced reject
|
||||||
- name: "Run dev tests"
|
|
||||||
# e.g. generating the schema — these should not run with all features enabled
|
|
||||||
run: cargo insta test -p ruff_dev --unreferenced reject
|
|
||||||
# Check for broken links in the documentation.
|
# Check for broken links in the documentation.
|
||||||
- run: cargo doc --all --no-deps
|
- run: cargo doc --all --no-deps
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -321,6 +321,15 @@ mod schema {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.filter(|rule| {
|
||||||
|
// Filter out all test-only rules
|
||||||
|
#[cfg(feature = "test-rules")]
|
||||||
|
if rule.starts_with("RUF9") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
true
|
||||||
|
})
|
||||||
.sorted()
|
.sorted()
|
||||||
.map(Value::String)
|
.map(Value::String)
|
||||||
.collect(),
|
.collect(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue