Michael Chirico
Michael Chirico
to me, it's different -- almost everywhere in R, `1` actually means `1(double)` (according to the parser). but with `1:10` it's actually `1(integer)` (in effect, i.e., at runtime). for `1.0`...
are you OK with adding an option to disable for `:` (it can be off by default)
personally I use `L` equivalents for those cases. i don't have any justification for the difference :)
Revisiting this... Here in the source, the arguments to `a:b` are explicitly converted with `asReal()`: https://github.com/r-devel/r-svn/blob/f941f28d2db0f3ecbe4ae355a6b39d4f5612e592/src/main/seq.c#L166-L167 So `1:10` is consistent with what the code is actually doing / doesn't require...
> And what about, say, `list1[[1]]`? Maelle, I think that's one of the more common places where I think of this linter as "good", I definitely think it should lint....
renamed the milestone as 3.0.2 for now. we're free to rename it if we decide for a bump to 3.1
BTW, `stringr::str_detect()` I guess should be handled separately -- `str_detect(x, "^")` returns `NA` for `NA` input, so it's indeed equivalent with the `startsWith()` case.
That's basically right, but it's still something in our control that allows us to be more consistent. I don't think we use fancy quotes in any messages generated by us....
see some of the other cited issues, e.g. #1348. the issue gets way worse on complex R files.
@hadley this is both of our first release of `lintr`, so I think we're both figuring it out as we go along :) I think we should always do a...