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
{{ message }}
Repository navigation
spaces_inside_lintr lints alist() with missing default value #532
I think the spaces_inside_linter might need an exception for required arguments in alist() calls.
alist(x= )
defines formals of a function with one argument x that has no default value.
To me this form looks much more readable than
alist(x=)
Styler also agrees with me here:
styler::style_text("alist(x =)")
#> Warning: Could not use colored = TRUE, as the package prettycode is not#> installed. Please install it if you want to see colored output or see `?#> print.vertical` for more information.#> alist(x = )
writeLines("alist(x = )", tmp<- tempfile())
lintr::lint(tmp, lintr::spaces_inside_linter)
#> C:\Users\Alex\AppData\Local\Temp\RtmpyMy4Oz\file374c142a1812:1:10: style: Do not place spaces around code in parentheses or square brackets.#> alist(x = )#> ^
Activity
AshesITR commentedon Oct 24, 2020
#540 shows that
commas_linterneeds a fix as well (reprex isalist(x = , y = 2L)for that linter)AshesITR commentedon Jan 31, 2021
Superseeded by #540