adrienverge / yamllint

A linter for YAML files.
GNU General Public License v3.0
2.79k stars 265 forks source link

Enable ruff format? #636

Closed DimitriPapadopoulos closed 6 months ago

DimitriPapadopoulos commented 6 months ago

The Ruff Formatter

DimitriPapadopoulos commented 6 months ago

To see how it formats Python source code, run:

ruff format .
adrienverge commented 6 months ago

I'm -1 to change the current source code and alter Git history for 65 files and ~10k lines of code. Also I don't have a problem with currently-used single quotes or mixed indentation when it helps readability.

DimitriPapadopoulos commented 6 months ago

Single quotes won't change:

I haven't investigated indentation.

DimitriPapadopoulos commented 6 months ago

While git blame --ignore-revs-file is not perfect, it helps ignore changes related to formatting.

DimitriPapadopoulos commented 6 months ago

Let me run ruff format and try to minimize changes, so we can see the extent of changes.

DimitriPapadopoulos commented 6 months ago

indent-style is either tab or space.

adrienverge commented 6 months ago

Good that ruff supports mixed quotes :+1: I see all the changes in https://github.com/adrienverge/yamllint/pull/638, and I still don't think it helps readability, especially about the mixed indentations I mentioned. And changing all these 63 files is not appealing...