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
False positive in unnecessarry_lambda_linter() #2310
library(lintr)
lint(text="lapply(l, function(e) 'a' %in% names(e))", linters= unnecessary_lambda_linter())
#> <text>:1:11: warning: [unnecessary_lambda_linter] Pass names directly as a symbol to lapply() instead of wrapping it in an unnecessary anonymous function. For example, prefer lapply(DF, sum) to lapply(DF, function(x) sum(x)).#> lapply(l, function(e) 'a' %in% names(e))#> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Activity
MichaelChirico commentedon Nov 18, 2023
can you confirm this is in the current dev version? there's been some recent related fixes
IndrajeetPatil commentedon Nov 18, 2023
I had actually checked with current dev before adding the label. This indeed seems like another false positive.
Bisaloo commentedon Nov 20, 2023
Fixed by #2320