Skip to content

[Feature request] A shorthand to enable every rule ("select all") #396

Description

@Winipedia

Summary

Add a way to enable every rule at once, instead of having to list all 27 (and
counting) rule names individually. Something like:

  • A CLI flag, e.g. --select-all, or
  • A TOML wildcard reusing the pattern already established by [fix]:
    [rules]
    enable = "ALL"

Motivation

I want to integrate ryl for my project (pyrig),
and I wanted the strictest possible config — every rule on, at its strictest
option values, as a [tool.ryl] block in pyproject.toml. Doing that today means
manually enumerating all 27 rules by name, e.g.:

[tool.ryl.rules]
colons = "enable"
commas = "enable"
comments = "enable"
comments-indentation = "enable"
document-end = "enable"
# ...16 more...

This works, but it has two costs:

  1. It's a lot of boilerplate for "I want maximum strictness."
  2. It silently goes stale — if ryl adds rule Implement yamllint rule: document-end #28 next release, my config doesn't
    pick it up automatically. A "select all" option would.

This isn't a request to change the default-on behavior

I saw #248 — a rule should never run unless someone
explicitly said so, and ryl shouldn't silently apply a preset when no config is
found. This request doesn't touch that: --select-all / enable = "ALL" would
still be something a user has to type deliberately. It's an explicit, opt-in
maximum, not an implicit default — same category as extends: default, just
covering 100% of rules instead of the curated subset. (would love for this to also cover any custom rules you make)

Prior art

This is the same shape as ruff's select = ["ALL"], which is exactly what's
referenced in the ryl README as an API inspiration. It's also consistent with
ryl's own [fix] fixable = ["ALL"], which already uses "ALL" as a wildcard in
one config table — extending that convention to rule selection, not just fix
eligibility, would keep the config surface consistent.

Proposed behavior

Config Result
[rules] with individual rulename = "enable" entries unchanged — today's explicit model
--select-all (CLI) or enable = "ALL" (TOML) every currently-known rule enabled at its own built-in default options/level
Combined with a [rules.<name>] override table the override still wins, same as it would for an individually-enabled rule
No config at all unchanged — still an error per #248

I would really be exited if this would be possible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions