IssueRaiser

Human-friendly rule names

Pylint, ESLint and Clippy all let you enable or disable lints via human-friendly names e.g. Pylint [lets you configure](https://pylint.pycqa.org/en/v2.11.1/faq.html#do-i-have-to-remember-all-these-numbers): ``` disable= wildcard-import, method-hidden, too-many-lines ``` The idea is to also support such human-friendly names for ruff in `pyproject.toml`, while still somehow supporting the numeric codes for backwards compatibility. The reasoning being that symbolic names are much more human-friendly than cryptic numeric codes. Case in point projects that care about readable configs end up adding comments to every numeric code in their config: [zulip](https://github.com/zulip/zulip/blob/a7fd994cbd00cdc905801c6394e198f81a4a4c32/pyproject.toml#L126), [fastapi](https://github.com/tiangolo/fastapi/blob/5905c3f740c8590f1a370e36b99b760f1ee7b828/pyproject.toml#L172), [sphinx](https://github.com/sphinx-doc/sphinx/blob/e17f39e7b535f4849754d46f2cd2e411df8aa535/pyproject.toml#L163) Currently Ruff requires every rule to have a numeric code, which I don't think makes much sense given that Ruff also has Ruff-specific rules ... and I don't think we should have to introduce new cryptic numeric codes when we introduce a new Ruff-specific rule. This obviously requires quite some changes to the codebase/UI but I think doing this is worth it. In particular I would like us to follow the [Rust naming convention for lints](https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints): > t

Posted by not-my-profile on Jan 10, 2023, 8:54 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,500 issues0 comments

ux (Software)

Human-friendly rule names

not-my-profileJan 10, 2023, 8:54 PM

Pylint, ESLint and Clippy all let you enable or disable lints via human-friendly names e.g. Pylint [lets you configure](https://pylint.pycqa.org/en/v2.11.1/faq.html#do-i-have-to-remember-all-these-numbers): ``` disable= wildcard-import, method-hidden, too-many-lines ``` The idea is to also support such human-friendly names for ruff in `pyproject.toml`, while still somehow supporting the numeric codes for backwards compatibility. The reasoning being that symbolic names are much more human-friendly than cryptic numeric codes. Case in point projects that care about readable configs end up adding comments to every numeric code in their config: [zulip](https://github.com/zulip/zulip/blob/a7fd994cbd00cdc905801c6394e198f81a4a4c32/pyproject.toml#L126), [fastapi](https://github.com/tiangolo/fastapi/blob/5905c3f740c8590f1a370e36b99b760f1ee7b828/pyproject.toml#L172), [sphinx](https://github.com/sphinx-doc/sphinx/blob/e17f39e7b535f4849754d46f2cd2e411df8aa535/pyproject.toml#L163) Currently Ruff requires every rule to have a numeric code, which I don't think makes much sense given that Ruff also has Ruff-specific rules ... and I don't think we should have to introduce new cryptic numeric codes when we introduce a new Ruff-specific rule. This obviously requires quite some changes to the codebase/UI but I think doing this is worth it. In particular I would like us to follow the [Rust naming convention for lints](https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints): > t

Comments (0)

No comments yet. Start the discussion.

Comment on this issue