Skip to content

assignment_linter does not fully exclude implicit assignments #2765

@MichaelChirico

Description

@MichaelChirico
lint(text = "if (foo(a<-1)) TRUE", linters = assignment_linter(operator = "="))
# <text>:1:10: style: [assignment_linter] Use = for assignment, not <-.
# if (foo(a<-1)) TRUE
#          ^~

Linting this should be the purview of implicit_assignment_linter().

Metadata

Metadata

Assignees

No one assigned

    Labels

    false-positivecode that shouldn't lint, but does

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions