First, thank you for this very useful package!
Is the following lint intended?
txt <- "
y ~
var_1 +
var_2 +
var_3
"
lintr::lint(
txt,
linters = lintr::linters_with_defaults(),
parse_settings = FALSE
)
#> <text>:4:2: style: [indentation_linter] Indentation should be 4 spaces but is 2 spaces.
#> var_2 +
#> ^~~
lintr currently expects a "nested" indentation:
txt <- "
y ~
var_1 +
var_2 +
var_3
"
lintr::lint(
txt,
linters = lintr::linters_with_defaults(),
parse_settings = FALSE
)
#> ℹ No lints found.
I think it is suboptimal because there is no "hierarchy" between the variables.
FWIW, there have been similar discussions for air here: posit-dev/air#444.