You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use multiline logical conditions such as the following, lintr throws an error but this is the format that is automatically indented by RStudio (Ctrl + I) or by air.
is.null(a) ||
length(a) ==1&&
is.na(a)
A full reprex is here:
code_lines<-"is.null(a) || length(a) == 1 && is.na(a)writeLines(code_lines)#> is.null(a) ||#> length(a) == 1 &&#> is.na(a)lintr::lint( text = code_lines, linters = lintr::indentation_linter())#> '<text>:3:2': style: [indentation_linter] Indentation should be 4 spaces but is 2 spaces.#> is.na(a)#> ^~~
I would expect this to pass as I "feel" it is indented correctly.
packageVersion("lintr")
#> [1] ‘3.2.0’
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
When I use multiline logical conditions such as the following, lintr throws an error but this is the format that is automatically indented by RStudio (Ctrl + I) or by air.
A full reprex is here:
I would expect this to pass as I "feel" it is indented correctly.
The text was updated successfully, but these errors were encountered: