Closed
Description
As soon as there is a comment after the return
or stop
, it is correctly not linted, but neither are the following lines.
Will produce lints:
foo <- function() {
return(3)
5 + 2
}
False negative:
foo <- function() {
return(3) # A comment
5 + 2
}
The same applies to something that @MichaelChirico has already marked as a todo in the code, but I haven't found an issue about it:
However, not only will the following expression in the same line not be marked, but also those in subsequent lines will not be marked.
False negative:
foo <- function() {
return(3); x + 1
5 + 2
}