Skip to content

available_linters(tags = "deprecated") should "just work" #1959

Description

@MichaelChirico

I find the current behavior a bit strange:

available_linters(tags = "deprecated")
# [1] linter  package tags   
# <0 rows> (or 0-length row.names)

Almost surely, that's not what the user wanted. The problem is exclude_tags = "deprecated" by default, so we need to also specify exclude_tags = NULL:

nrow(available_linters(tags = "deprecated", exclude_tags = NULL))
# [1] 7

I see two options:

  1. Special case "deprecated" with an if (missing(exclude_tags) && identical(tags, "deprecated")) exclude_tags <- NULL
  2. Always run exclude_tags <- setdiff(exclude_tags, tags), i.e., exclude_tags takes priority over tags if there's any collision

Either way, it will simplify the implementation for #1958.

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions