mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
[pycodestyle
] Implement blank-line-at-end-of-file
(W391
) (#10243)
## Summary Implements the [blank line at end of file](https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes) rule (W391) from pycodestyle. Renamed to TooManyNewlinesAtEndOfFile for clarity. ## Test Plan New fixtures have been added Part of #2402
This commit is contained in:
parent
c746912b9e
commit
b117f33075
20 changed files with 232 additions and 1 deletions
|
@ -168,6 +168,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
|||
(Pycodestyle, "W291") => (RuleGroup::Stable, rules::pycodestyle::rules::TrailingWhitespace),
|
||||
(Pycodestyle, "W292") => (RuleGroup::Stable, rules::pycodestyle::rules::MissingNewlineAtEndOfFile),
|
||||
(Pycodestyle, "W293") => (RuleGroup::Stable, rules::pycodestyle::rules::BlankLineWithWhitespace),
|
||||
(Pycodestyle, "W391") => (RuleGroup::Preview, rules::pycodestyle::rules::TooManyNewlinesAtEndOfFile),
|
||||
(Pycodestyle, "W505") => (RuleGroup::Stable, rules::pycodestyle::rules::DocLineTooLong),
|
||||
(Pycodestyle, "W605") => (RuleGroup::Stable, rules::pycodestyle::rules::InvalidEscapeSequence),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue