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
seq_linter() gives the wrong message for n:1 lints #1542
The result message should mention rev(), but currently it doesn't:
lint(text = ".N:1", linters = seq_linter())
# <text>:1:1: warning: [seq_linter] .N:1 is likely to be wrong in the empty edge case. Use seq_len(1) instead.
# .N:1
# ^~~~
Activity
IndrajeetPatil commentedon Sep 20, 2022
The same issue also holds for all other relevant functions I think:
Created on 2022-09-20 with reprex v2.0.2
We have a TODO to track this:
lintr/R/seq_linter.R
Lines 67 to 68 in a8d5d1f
MichaelChirico commentedon Sep 20, 2022
Also for viz: trying to get r-core to give me more confidence in recommending a replacement in the
rev()case:https://bugs.r-project.org/show_bug.cgi?id=18406