Skip to content

Regression: inner_combine_linter() throwing for singleton c() calls #2017

Description

@MichaelChirico
lintr::lint(text = "c(exp())", linters = lintr::inner_combine_linter())
# <text>:1:1: warning: [inner_combine_linter] Combine inputs to vectorized functions first to take full advantage of vectorization, e.g., exp(c(x, y)) only runs the more expensive exp() once as compared to c(exp(x), exp(y)).
# c(exp())
# ^~~~~~~~

This should (maybe) trigger unnecessary_concatenation_linter(), but not inner_combine_linter().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    false-positivecode that shouldn't lint, but doesregressioncode that used to work, but now doesn't

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions