-
Notifications
You must be signed in to change notification settings - Fork 193
Closed
Labels
false-positivecode that shouldn't lint, but doescode that shouldn't lint, but does
Description
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))
#> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Created on 2023-11-18 with reprex v2.0.2
Metadata
Metadata
Assignees
Labels
false-positivecode that shouldn't lint, but doescode that shouldn't lint, but does