ruff icon indicating copy to clipboard operation
ruff copied to clipboard

Use `indent-width` and `lint.tab-size` when checking indentation in `E` rules

Open zanieb opened this issue 2 years ago • 5 comments

Closes https://github.com/astral-sh/ruff/issues/8705

Needs test cases still. We should consider updating the formatter incompatibility documentation and checks.

zanieb avatar Nov 15 '23 23:11 zanieb

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

github-actions[bot] avatar Nov 15 '23 23:11 github-actions[bot]

@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

MichaReiser avatar Nov 28 '23 05:11 MichaReiser

Was going to say, I don't remember a tab size implementation 😆

evanrittenhouse avatar Nov 28 '23 19:11 evanrittenhouse

@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

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.

JonathanPlasse avatar May 08 '24 09:05 JonathanPlasse

@zanieb - should I see this through?

charliermarsh avatar May 16 '24 02:05 charliermarsh

(I haven't had the time to dedicate to this. Anyone is welcome to take it up.)

zanieb avatar Jul 08 '24 15:07 zanieb