The deprecation message for with_defaults urges users to use linters_with_defaults. For most uses, I imagine that is the correct replacement. But the deprecation causes some confusion in settings where an old-style config looked like:
linters: with_defaults(
assignment_linter = NULL,
undesirable_operator_linter(
with_defaults(
"<-" = "Use =, not <-, for assignment.",
default = default_undesirable_operators
)
)
)
Here, when lintr::lint_package() is called, two deprecation messages are printed to the console. Both suggest using linters_with_defaults in place of with_defaults. But when defining the undesirable-op list, linters_with_defaults is not the appropriate replacement for with_defaults. Here, the recommendation should be modify_defaults.
Could we modify the deprecation warning to print
Warning message:
Function with_defaults was deprecated in lintr version 3.0.0. Use linters_with_defaults or modify_defaults instead.
The deprecation message for
with_defaultsurges users to uselinters_with_defaults. For most uses, I imagine that is the correct replacement. But the deprecation causes some confusion in settings where an old-style config looked like:Here, when
lintr::lint_package()is called, two deprecation messages are printed to the console. Both suggest usinglinters_with_defaultsin place ofwith_defaults. But when defining the undesirable-op list,linters_with_defaultsis not the appropriate replacement forwith_defaults. Here, the recommendation should bemodify_defaults.Could we modify the deprecation warning to print