Document more rules with options #22198
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
While analyzing our rules, I wanted to know which of them use configuration options but noticed that some of them were not documented (or at least not documented in a separate
## Optionssection).I had Claude generate an initial list of candidate rules, but it contained a lot of false positives that I filtered out, and I ended up adding all of these sections myself. I'm not claiming that the options lists are exhaustive (as in the rules may use additional options beyond what I found), but this will at least help with my goal of determining whether or not a rule is configurable at all and also hopefully be helpful in general.
I mostly just tacked on an
## Optionssection without any commentary, but I added a couple lines of explanation when I felt that the meaning of the options wasn't obvious from the context.I also noticed a bit of variation in the
flake8-simplifyrules from doing this. Some of them offer a diagnostic but no fix depending on the resulting line length of the suggestion, while others offer neither. I'm not sure we need to do anything different here, but it seemed worth mentioning.Test Plan
Docs tests to make sure the links are right