You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide a more detailed output, including the line number and a description of what I need to format as in flake8. I think you can update the output for use with the --check flag only.
code example:
deffoo():
passdefbar():
pass
flake8 output:
my_awesome_project/main.py:3:1: E302 expected 2 blank lines, found 0
my_awesome_project/main.py:4:9: W292 no newline at end of file
ruff format --check output:
Would reformat: my_awesome_project/main.py
1 file would be reformatted
The text was updated successfully, but these errors were encountered:
Sounds like you're looking for #7352 with ruff check for those specific rules.
Note that the formatter and linter are different, but if you want to see the format changes, run ruff format --diff. See this document for information on how the linter and formatter overlap. It's unlikely that we'll be able to provide discrete "codes" or descriptions of what needs to be changed by the formatter. It works in a different way than lint rules and implementing it would be very challenging.
This gives such a complex result. flake8's output is easier to understand. I think if you add more colours to diff (like in git diff), the output might become easier.
In general, I would like the result to be the same as "check" only because part of the pycodestyle rules are not supported right now (waiting for #9266), and I can only see what I missed by using the formatter. Thanks for the answer.
You can get colors with something like ruff format --diff | ydiff (there are a bunch of different tools out there for viewing diffs). I agree that's not ideal though we should probably emit colored diffs by default!
In general, I would like the result to be the same as "check"
Yeah I agree this would be nice if it were feasible.
Please provide a more detailed output, including the line number and a description of what I need to format as in flake8. I think you can update the output for use with the --check flag only.
code example:
flake8 output:
ruff format --check output:
The text was updated successfully, but these errors were encountered: