Skip to content

Different behaviour of undesirable linters with empty character vectors #1867

Closed
@IndrajeetPatil

Description

@IndrajeetPatil

I'd have expected both of these arguments to have similar behaviour. Is this expected?

library(lintr)

invisible(undesirable_function_linter(fun = character(0L)))

undesirable_operator_linter(op = character(0L))
#> Error in undesirable_operator_linter(op = character(0L)): 'op' should be a named character vector; use missing elements to indicate default messages.

Created on 2022-12-20 with reprex v2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions