Closed jorenham closed 2 days ago
Is there a way to set configurations, e.g.
max_line_length = 88
frompyproject.toml
? It would be best to have a single source of truth.
ruff
uses these settings by default 🤷🏻
Is there a way to set configurations, e.g.
max_line_length = 88
frompyproject.toml
? It would be best to have a single source of truth.
and to answer your question; no, I don't think the editorconfig spec supports dynamic settings
Nor the reverse, unfortunately: https://github.com/astral-sh/ruff/issues/1530
That being said, if we treat .editorconfig
as the SSoT and have comments on all related configs warning that the two should be kept in sync, then it's fine 🤞 .
OTOH. Doesn't pre-commit fix most of these automatically? What's the added benefit over running pre-commit run [-a]
/ having it auto fix when git committing ?
I wasn't aware that pre-commit looked at this?
not this config file specifically, but hooks can fix line endings, tab-size, etc.
Oh btw, the max_line_length = 88
is in the editorconfig spec, but I've seen it used in several other places (such as numpy) 🤷🏻
not this config file specifically, but hooks can fix line endings, tab-size, etc.
Yea, there's hooks for most of these. This config is mostly useful for IDE's
hmm.. I get why it's useful. I just have the same concern as https://github.com/astral-sh/ruff/issues/1530#issuecomment-1546176355. Especially if we have pre-commit.ci / pre-commit in a GH Action for CI with hooks that cover everything.
hmm.. I get why it's useful. I just have the same concern as astral-sh/ruff#1530 (comment)
Yea I can see that; I prefer a minimal amount of files in the root myself as well.
But in practice, this is one of those configs that you shouldn't have to touch ever again. And if I remember correctly, repo-review
also requires this.
But I'm also fine with not having an editorconfig; I can configure vscode myself just fine 🤷🏻
With git-exclude you can have it and the ignore won't be forced on others...
But with good code comments in pyproject.toml
& editorconfig
& pre-commit.yaml
discussing any overlaps, I'm also fine to merge this.
With git-exclude you can have it and the ignore won't be forced on others...
Yea, I use that for a bunch of cache dirs. But I don't think I even use editorconfig; I only added it because others might use it.
Let's close this then; we could always reconsider later if someone asks for it
https://editorconfig.org/