Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support with_defaults(default = NULL), with warning #1361

Closed
MichaelChirico opened this issue Jun 5, 2022 · 0 comments · Fixed by #1362
Closed

Support with_defaults(default = NULL), with warning #1361

MichaelChirico opened this issue Jun 5, 2022 · 0 comments · Fixed by #1362
Labels
breaking change ☠️ API change likely to affect existing code
Milestone

Comments

@MichaelChirico
Copy link
Collaborator

One last new error discovered by #1304 -- usage like that here:

https://github.com/rexyai/RestRserve/blob/852785a6bfa1c6691de520bd14d1246619436419/.lintr#L1-L11

linters: with_defaults(
  assignment_linter = RestRserve:::assignment_eq_linter,
  infix_spaces_linter,
  commas_linter,
  no_tab_linter,
  spaces_inside_linter,
  spaces_left_parentheses_linter,
  trailing_blank_lines_linter,
  trailing_whitespace_linter,
  line_length_linter(120),
  default = NULL)

results in an error on main:

lintr::lint_package()
Error in modify_defaults(..., defaults = defaults) : 
  `defaults` must be a named list.
In addition: Warning message:
Function with_defaults was deprecated in lintr version 2.0.9001. Use linters_with_defaults instead.

We should soften this to be a deprecation warning instead & support the intended usage (which should be the same as default = list())

@MichaelChirico MichaelChirico added this to the 3.0.0 milestone Jun 5, 2022
@MichaelChirico MichaelChirico added the breaking change ☠️ API change likely to affect existing code label Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change ☠️ API change likely to affect existing code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant