Skip to content

Selectively suppress formatting changes #185

Closed

Description

@gadenbuie

ruff format supports # fmt: off, # fmt: on and # fmt: skip pragma comments to selectively disable the formatter. (https://docs.astral.sh/ruff/formatter/#format-suppression)

It'd be neat if air supported a similar system for selective disabling formatting, which might look like this:

# fmt: off
private$event_callback_counts[[domain]] <- private$event_callback_counts[[domain]] - 1
# fmt: on

private$event_callback_counts[[domain]] <- private$event_callback_counts[[domain]] + 1 # fmt: skip

Activity

  1. DavisVaughan commented on Jan 21, 2025

    @DavisVaughan
    Collaborator

    Dup of #52

  2. gadenbuie commented on Jan 21, 2025

    @gadenbuie
    ContributorAuthor

    I momentarily felt bad for not finding #52 when I searched the issues before opening this one. And then I clicked into #52 😆

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions