Skip to content

Feedback on new default rules #27213

Open
2 of 4 issues completed
Open

Description

@ntBre

This is a tracking issue to gather feedback on the new default rules stabilized in 0.16. We previously had a discussion when these were in preview, but most of the incoming feedback after the release is in the form of issues, and I think it makes sense to have a separate location now anyway.

Our current versioning policy means that we have to wait for any changes to the defaults until the next minor release, although this could obviously be sooner than normal if there's a lot of feedback.

The following sections can be used to track changes not captured in the sub-issues.

Add to defaults

Remove from defaults

Needs decision

Activity

  1. added
    rule-selectionRelated to enabling or disabling rules
    trackingA "meta" issue that tracks completion of a bigger task via a list of smaller scoped issues.
    on Jul 27, 2026
  2. added this to the v0.17 milestone on Jul 27, 2026
  3. meejah commented on Aug 26, 2026

    @meejah

    Hopefully this is the correct spot.

    I've been using ruff on a minor project, and recently made a PR for it. There are a bunch of new rules added to ruff (great!) but I don't want to fix them all right now. My two options are:

    • pin ruff to some exact version
    • figure out what rules to add to the ignore set

    Overall, I prefer to upgrade things. It would be nice if ruff had an option to spit out "ignore" config for either:

    • all currently-failing lints
    • all new default lints "from version X" or similar

    The latter feature could be something in the release-notes I suppose, like "to ignore all the new defaults this version, put ... in your config".
    (In my case this was upgrading from 0.15.7 -> 0.16.4 but the exact versions likely don't matter)

    As a workaround, the output from ruff check --statistics comes pretty close -- with a little text-manipulation it's fairly easy to add to the config.

  4. ntBre commented on Aug 26, 2026

    @ntBre
    ContributorAuthor

    Thanks for the feedback!

    We've previously discussed a somewhat similar approach to this problem as "baselines" (#1149). Another current option, though it can be a bit noisy depending on how many diagnostics you have, is to use --add-noqa or --add-ignore, which will suppress all diagnostics inline instead of ignoring the rules project-wide.

    The latter feature could be something in the release-notes I suppose, like "to ignore all the new defaults this version, put ... in your config".

    You may have missed it since you were upgrading across the minor release boundary, but a variant of this was included in the 0.16.0 blog post:

    If you want to revert to the old default set, you can easily select the old rules with this configuration:

    [lint]
    select = ["E4", "E7", "E9", "F"]

    I thought that was also in the changelog, but it looks like I didn't copy it over there!

    Since I love playing with jq, you could also get the list of codes to ignore with something like:

    ❯ ruff check --no-cache --output-format=json | jq '[.[].code] | unique'
    [
      "B007",
      "E402",
      "F403",
      "F821",
      "TID251",
      "TID253"
    ]
  5. modified the milestones: v0.17, v0.18 on Sep 23, 2026
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

    rule-selectionRelated to enabling or disabling rulestrackingA "meta" issue that tracks completion of a bigger task via a list of smaller scoped issues.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions