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_unused_attached_pkg_fun_linter when imported function is called as a callback #133

Closed
Gotfrid opened this issue Aug 20, 2024 · 2 comments

Comments

@Gotfrid
Copy link
Member

Gotfrid commented Aug 20, 2024

box.linters version

0.9.1

Sample source code to lint

box::use(
  shiny[div],
)

create_element <- function(wrapper) {
  wrapper(class = "container")
}

create_element(wrapper = div)

Lint command used

rhino::lint_r()

Lint result

app/logic/module2.R:2:9: warning: [box_unused_attached_pkg_fun_linter] Imported function unused.
  shiny[div],
        ^~~

Expected result

Expected to have no linter issues.
Please notice, that it happens only when using a function from a package. When doing the same with a function defined in a local module, there is no linter issue.

@radbasa
Copy link
Collaborator

radbasa commented Aug 21, 2024

@Gotfrid Please check if this bug exists in version >= 0.10.1.

This may be similar to #124 addressed in PR #128.

@Gotfrid
Copy link
Member Author

Gotfrid commented Aug 21, 2024

You are right, I can't reproduce this issue on version 0.10.2.
Thank you for your hard work, closing this issue!

@Gotfrid Gotfrid closed this as completed Aug 21, 2024
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