Skip to content

Conflicts with the Air formatter (indent size) #2875

@eitsupi

Description

@eitsupi

lintr complains about line 5 of the file formatted by Air below, but I don't know why.

func <- function() {
  if (
    isTRUE(TRUE) ||
      (isTRUE(TRUE) &&
        isTRUE(TRUE))
  ) {
    NULL
  }
}

Reprex:

lintr::lint(
  text = r"(
func <- function() {
  if (
    isTRUE(TRUE) ||
      (isTRUE(TRUE) &&
        isTRUE(TRUE))
  ) {
    NULL
  }
})"
)
#> <text>:6:8: style: [indentation_linter] Indentation should be 9 spaces but is 8 spaces.
#>         isTRUE(TRUE))
#>        ^~

Created on 2025-07-13 with reprex v2.1.1

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