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
There is definitely an inconsistency here. Thanks for pointing out.
cat("if (TRUE)\n x")
#> if (TRUE)#> x
cat("for (i in 0)\n x")
#> for (i in 0)#> x
cat("while (TRUE)\n x")
#> while (TRUE)#> xlintr::lint(text="if (TRUE)\n x", linters=lintr::indentation_linter())
lintr::lint(text="for (i in 0)\n x", linters=lintr::indentation_linter())
#> <text>:2:2: style: [indentation_linter] Indentation should be 0 spaces but is 2 spaces.#> x#> ~^lintr::lint(text="while (TRUE)\n x", linters=lintr::indentation_linter())
R accepts single-line bodies, without curly braces, for the
if
and thefor
statements.Is there any reason why lintr accepts that for
if
but not forfor
? For instance:The text was updated successfully, but these errors were encountered: