-
Notifications
You must be signed in to change notification settings - Fork 193
Closed
Labels
false-positivecode that shouldn't lint, but doescode that shouldn't lint, but does
Description
This is pretty niche but shows up a conflicting pair of rules:
> lintr::lint("alist(a =)\n")
<text>:1:9: style: Put spaces around all infix operators.
alist(a =)
^~
> lintr::lint("alist(a = )\n")
<text>:1:10: style: Do not place spaces around code in parentheses or square brackets.
alist(a = )
^
> lintr::lint("alist(a =, b = NULL)\n")
<text>:1:9: style: Put spaces around all infix operators.
alist(a =, b = NULL)
^~
> lintr::lint("alist(a = , b = NULL)\n")
<text>:1:11: style: Commas should never have a space before.
alist(a = , b = NULL)
So for arguments that are "explicitly missing" there is no way of satisfying the default set of linter rules - we must and cannot have a space following the =
, for cases that are within or at the end of an argument list.
The above behaviour is triggered in both the cran version (2.0.1) and current github (2.0.1.9000, eece3c1)
Metadata
Metadata
Assignees
Labels
false-positivecode that shouldn't lint, but doescode that shouldn't lint, but does