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

library_call_linter() doesn't allow suppressed library() calls #2163

Closed
MichaelChirico opened this issue Sep 13, 2023 · 0 comments · Fixed by #2168
Closed

library_call_linter() doesn't allow suppressed library() calls #2163

MichaelChirico opened this issue Sep 13, 2023 · 0 comments · Fixed by #2168
Labels
false-positive code that shouldn't lint, but does
Milestone

Comments

@MichaelChirico
Copy link
Collaborator

lint("
suppressMessages({
  library(a)
  library(b)
})
",
library_call_linter())
# <text>:3:3: warning: [library_call_linter] Move all library calls to the top of the script.
#   library(a)
#   ^~~~~~~~~~
# <text>:4:3: warning: [library_call_linter] Move all library calls to the top of the script.
#   library(b)
#   ^~~~~~~~~~
@MichaelChirico MichaelChirico added the false-positive code that shouldn't lint, but does label Sep 13, 2023
@MichaelChirico MichaelChirico added this to the 3.1.1 milestone Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
false-positive code that shouldn't lint, but does
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant