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

[LINT_BUG]: box_usage_linter false positive when mixing packages with scripts in box::use #150

Open
TymekDev opened this issue Oct 18, 2024 · 1 comment

Comments

@TymekDev
Copy link

box.linters version

v0.10.5

Sample source code to lint

box::use(
  app/main,
  shiny[shinyApp],
)


shinyApp(main$ui, main$server)

Lint command used

code <- "box::use(
  app/main,
  shiny[shinyApp],
)


shinyApp(main$ui, main$server)"

lintr::lint(
  code,
  linters = lintr::linters_with_defaults(defaults = box.linters::rhino_default_linters)
)

Lint result

<text>:7:1: warning: [box_usage_linter] Function not imported nor defined.
shinyApp(main$ui, main$server)
^~~~~~~~

Expected result

I expected to not receive a lint as shinyApp is imported.

@radbasa
Copy link
Collaborator

radbasa commented Oct 22, 2024

I'm surprised the box_separate_calls_linter did not throw lint.

https://appsilon.github.io/box.linters/reference/box_separate_calls_linter.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants