Skip to content

indentation_linter() conflicts with {styler} #1898

Closed
@IndrajeetPatil

Description

@IndrajeetPatil

I am not sure if this is the same as tidyverse/style#197, but here is another instance where indentation_linter() lints code that {styler} thinks is in line with the tidyverse style guide:

library(lintr)

"out <- data.frame(.ci_generic(x,
  ci = ci,
  ...
))" -> code

# styler won't change this code
styler::style_text(code)
#> out <- data.frame(.ci_generic(x,
#>   ci = ci,
#>   ...
#> ))

# but lintr will lint this code
lint(text = code, linters = indentation_linter())
#> <text>:2:2: style: [indentation_linter] Indentation should be 20 spaces but is 2 spaces.
#>   ci = ci,
#>  ^~~~~~~~~~

Created on 2023-01-11 with reprex v2.0.2

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