mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
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:
parent
598549d24e
commit
a459d8ffc7
4 changed files with 29 additions and 18 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue