mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
[ruff
] Indented form feeds (RUF054
) (#16049)
## Summary Resolves #12321. The physical-line-based `RUF054` checks for form feed characters that are preceded by only tabs and spaces, but not any other characters, including form feeds. ## Test Plan `cargo nextest run` and `cargo insta test`.
This commit is contained in:
parent
9ae98d4a09
commit
f367aa8367
10 changed files with 157 additions and 2 deletions
32
crates/ruff_linter/resources/test/fixtures/ruff/RUF054.py
vendored
Normal file
32
crates/ruff_linter/resources/test/fixtures/ruff/RUF054.py
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
############# Warning ############
|
||||
# This file contains form feeds. #
|
||||
############# Warning ############
|
||||
|
||||
|
||||
# Errors
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def _():
|
||||
pass
|
||||
|
||||
if False:
|
||||
print('F')
|
||||
print('T')
|
||||
|
||||
|
||||
# No errors
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def _():
|
||||
pass
|
||||
|
||||
def f():
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue