Skip to content

Commit 1b082ce

Browse files
authored
Add maximum length for line-length to JSON schema (#7412)
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> Adds the maximum of 320 for the line-length setting to the JSON schema for better integration with IDEs. Related #6873 ## Test Plan <!-- How was it tested? -->
1 parent f936d31 commit 1b082ce

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

crates/ruff_workspace/src/options.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ pub struct Options {
319319
"#
320320
)]
321321
/// The line length to use when enforcing long-lines violations (like
322-
/// `E501`). Must be greater than `0`.
322+
/// `E501`). Must be greater than `0` and less than or equal to `320`.
323+
#[cfg_attr(feature = "schemars", schemars(range(min = 1, max = 320)))]
323324
pub line_length: Option<LineLength>,
324325
#[option(
325326
default = "4",

ruff.schema.json

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)