Filter off-by-default RUF014 out of schema (#5832)

**Summary** Previously, `RUF014` would be part of ruff.schema.json
depending on whether or not the `unreachable-code` feature was active.
This caused problems for contributors who got unrelated RUF014 changes
when updating the schema without the feature active.

An alternative would be to always add `RUF014`.

**Test plan** `cargo dev generate-all` and `cargo run --bin ruff_dev
--features unreachable-code -- generate-all` now have the same effect.
This commit is contained in:
konsti 2023-07-19 23:06:10 +02:00 committed by GitHub
parent 598549d24e
commit a459d8ffc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 18 deletions

View file

@ -61,7 +61,7 @@ mod tests {
use super::{main, Args};
#[cfg_attr(not(feature = "unreachable-code"), test)]
#[test]
fn test_generate_json_schema() -> Result<()> {
let mode = if env::var("RUFF_UPDATE_SCHEMA").as_deref() == Ok("1") {
Mode::Write