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_mod_fun_exists_linter errors due to uninstalled packages #153

Open
TymekDev opened this issue Dec 7, 2024 · 1 comment

Comments

@TymekDev
Copy link

TymekDev commented Dec 7, 2024

box.linters version

0.10.5

Sample source code to lint

Make sure to have {here} not installed.

foo.R

box::use(
  ./bar[asdf]
)

bar.R

box::use(
  here[here],
)

#' @export
asdf <- here

Lint command used

lintr::lint(
  "./foo.R",
  linters = box.linters::box_mod_fun_exists_linter()
)

Lint result

Linters fails to run with the following error:

Error: Linter 'box.linters::box_mod_fun_exists_linter' failed in <snip>/foo.R: there is no package called ‘here’

Expected result

I would expect an error lint and/or a graceful handling of the missing package.

@TymekDev
Copy link
Author

TymekDev commented Dec 7, 2024

It's caused by loading the module:

mod_ns <- load_mod(info)

@TymekDev TymekDev changed the title [LINT_BUG]: [LINT_BUG]: box_mod_fun_exists_linter errors due to uninstalled packages Dec 8, 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

When branches are created from issues, their pull requests are automatically linked.

1 participant