Skip to content

Commit

Permalink
Add maximum length for line-length to JSON schema (#7412)
Browse files Browse the repository at this point in the history
<!--
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? -->
  • Loading branch information
zanieb authored Sep 15, 2023
1 parent f936d31 commit 1b082ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion crates/ruff_workspace/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ pub struct Options {
"#
)]
/// The line length to use when enforcing long-lines violations (like
/// `E501`). Must be greater than `0`.
/// `E501`). Must be greater than `0` and less than or equal to `320`.
#[cfg_attr(feature = "schemars", schemars(range(min = 1, max = 320)))]
pub line_length: Option<LineLength>,
#[option(
default = "4",
Expand Down
6 changes: 4 additions & 2 deletions ruff.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1b082ce

Please sign in to comment.