Filter out test rules in RuleSelector JSON schema (#9901)

This commit is contained in:
Micha Reiser 2024-02-08 22:06:51 +01:00 committed by GitHub
parent fe7d965334
commit 49c5e715f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions

View file

@ -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:

View file

@ -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(),