Use `indent-width` and `lint.tab-size` when checking indentation in `E` rules
Closes https://github.com/astral-sh/ruff/issues/8705
Needs test cases still. We should consider updating the formatter incompatibility documentation and checks.
ruff-ecosystem results
Linter (stable)
✅ ecosystem check detected no linter changes.
Linter (preview)
✅ ecosystem check detected no linter changes.
@evanrittenhouse I believe you implemented the tab size option back then. Do you remember why the E rules didn't use the setting?
Sorry, I was wrong. Looking at the history, it must have been @JonathanPlasse
Was going to say, I don't remember a tab size implementation 😆
@evanrittenhouse I believe you implemented the tab size option back then. Do you remember why the
Erules didn't use the setting?Sorry, I was wrong. Looking at the history, it must have been @JonathanPlasse
I implemented it everywhere the line length comparison was used, E501, the one for max-doc-line-length, and rules that checks if the line length before applying fixes. I did not touch logical lines code when implementing this.
@zanieb - should I see this through?
(I haven't had the time to dedicate to this. Anyone is welcome to take it up.)