Closed
Description
I've found that the commas_linter does not recognize lints when the line to be linted is preceded by a blank line or a commented line. Below is a minimal working example:
file: Test.r
#random comment
a <- c(4,5)
b = 7
Then, I run the following:
lintr::lint("./Test.r", linters = list(spacesAfterCommas = commas_linter,
useArrowForAssignments = assignment_linter))
The only error I get is the following:
./Test.r:4:3: style: Use <-, not =, for assignment.
b = 7
^
Why is the commas_linter not catching my error? If I remove the blank line, commas_linter catches the lint.
Metadata
Metadata
Assignees
Labels
No labels