add full option name in formatter warning#18217
add full option name in formatter warning#18217MichaReiser merged 5 commits intoastral-sh:mainfrom CodeMan62:codeman/18199
Conversation
|
This time tests must pass because last time I have give wrong path but this time this is right and good to go |
crates/ruff/tests/format.rs
Outdated
|
|
||
| ----- stderr ----- | ||
| warning: The following rule may cause conflicts when used with the formatter: `COM812`. To avoid unexpected behavior, we recommend disabling this rule, either by removing it from the `select` or `extend-select` configuration, or adding it to the `ignore` configuration. | ||
| warning: The following rule may cause conflicts when used with the formatter: `COM812`. To avoid unexpected behavior, we recommend disabling this rule, either by removing it from the `select` or `extend-select` configuration, or adding it to the `ruff.ignore` configuration. |
There was a problem hiding this comment.
What you change here is the test. You need to change the implementation here
ruff/crates/ruff/src/commands/format.rs
Line 824 in fa62801
There was a problem hiding this comment.
thanks i was just finding it.
EDIT:- Done
MichaReiser
left a comment
There was a problem hiding this comment.
Thanks, I've a small suggestion but this otherwise looks good.
crates/ruff/src/commands/format.rs
Outdated
| if let [rule] = rule_names.as_slice() { | ||
| warn_user_once!( | ||
| "The following rule may cause conflicts when used with the formatter: {rule}. To avoid unexpected behavior, we recommend disabling this rule, either by removing it from the `select` or `extend-select` configuration, or adding it to the `ignore` configuration." | ||
| "The following rule may cause conflicts when used with the formatter: {rule}. To avoid unexpected behavior, we recommend disabling this rule, either by removing it from the `select` or `extend-select` configuration, or adding it to the `lint.ignore` configuration." |
There was a problem hiding this comment.
Let's use the full qualified name for all settings (same below)
| "The following rule may cause conflicts when used with the formatter: {rule}. To avoid unexpected behavior, we recommend disabling this rule, either by removing it from the `select` or `extend-select` configuration, or adding it to the `lint.ignore` configuration." | |
| "The following rule may cause conflicts when used with the formatter: {rule}. To avoid unexpected behavior, we recommend disabling this rule, either by removing it from the `lint.select` or `lint.extend-select` configuration, or adding it to the `lint.ignore` configuration." |
There was a problem hiding this comment.
Okk
EDIT:- DONE
|
|
Thanks |
Summary
So this PR fixes #18199 in the issue mentioned the error message is as followed
the new message contains full option name as guided in issue the new message looks like this
Test Plan
I just did manual testing