Skip to content

Rename of default= to defaults= is hard to debug (linters_with_defaults) #1336

@MichaelChirico

Description

@MichaelChirico

Just discovered this hard-to-debug issue:

# pre-3.0.0 usage
my_linters <- with_defaults(default = list(), no_tab_linter())
writeLines(names(my_linters))
# no_tab_linter

OK, we get a warning:

Warning message: Function with_defaults was deprecated in lintr version 2.0.9001. Use linters_with_defaults instead.

So we switch:

my_linters <- linters_with_defaults(default = list(), no_tab_linter())
writeLines(names(my_linters))
# assignment_linter
# ...
# default
# ...
# vector_logic_linter

i.e., default= is taken as part of the ... arguments, and we don't start from a blank (list()) override.

Probably we should allow default= to work in linters_with_defaults(), with warning.

(Or perhaps this pluralization was an oversight?)

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions