-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
format-specific ignore
setting
#8741
Comments
The
Perhaps you are looking for the |
@zanieb Thank you for the quick answer, I will first check the link and flag and come back to you right after. |
Hi again @zanieb, I was able to test/understand your answers. For the The What I am missing is the details about the security issue and recommended fix. Is there a way for it? Thank you again for your time. |
Your understanding is correct. Rules are considered incompatible if the formatter may introduce new lint violations.
|
Glad the documentation was helpful! See #7352 for showing fixes by default. |
Just to avoid any misunderstanding: I am not expecting ruff to do anything that is not done by the original tool. The fixes recommendations mentioned here only concerns bandit's output: the original tool is doing the recommendations. Regarding the formatter, I didn't found much configuration options, but I wrongly assumed it was relying on the linting option and missed that it was meant to be strongly opinionated. I don't know if this information is easy to find. Also, even if we can partially use ruff with another linter/formatter, I feel like ruff's format should be able to match all the checks that it can define. Thank you all for the responses. |
FWIW, below is the list of rules (I think) that can be ignored when using the formatter as they are fixed by (and in some cases, depending on the configuration, contradict with) the formatter: In other words, these rules fully overlap with the formatter. "E501" is not contained in this list as it only partly overlaps with the formatter as explained in https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules. Remark that "ISC001" and "ISC002" are listed in https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules because running the formatter may sometimes introduce these lint errors (in particular, when lines are combined into a single line by the formatter). However, they are not contained in above list as the formatter doesn't fix or contradict these lint errors and thus they are not overlapping. |
Hi,
First, thank you for this wonderful tool.
I am facing this warning:
The rules work on
check
, but not onformat
.Would it be possible to ignore them on
format
command only. Could we have anextend-ignore
in the[format]
?Also, I used the
flake8-bandit
tool, but it is not reporting the same way as the bandit tool itself and it is also not providing any fix recommendation (e.g. "Use defusedxml instead of lxml"). Is there a way to tweak that ?The text was updated successfully, but these errors were encountered: