You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linter 'box_mod_fun_exists_linter' failed in /home/osenan/Documents/Apptests/box_issues/tests/testthat/test-two-numbers.R: unable to load module “logic/init”; not found in “/home/osenan/Documents/Apptests/box_issues”, “/home/osenan/.cache/R/renv/cache/v5/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/box/1.2.0/d94049c1d9446b0abb413fde9e82a505/box/mod”, “/home/osenan/Documents/Apptests/box_issues”
There is an error in loading because it does not follows the working directory change
Expected result
lint_r shuold have been executed (could find or not style errors)
The text was updated successfully, but these errors were encountered:
Linters ({box.linters} or {lintr} itself), being static code analysis tools do not execute code. They cannot follow changes made by code like withr::with_*().
Linters operate within the existing current environment.
box.linters version
‘0.10.3’
Sample source code to lint
This a reproducible (toy) example that fails (uploaded files with
.txt
extension, please replace with.R
):create a rhino app with
rhino::init()
Add attached file
[init.R
](http://init.to/)to logic folderinit.txt
Add test test-two_numbers.R test-two-numbers.txt to folder tests/testthat
Running
rhino::test_r()
passes the tests.But running
rhino::lint_r()
fails, because box.linters is not following withr::with_dir.
Lint command used
linters:
linters_with_defaults(
defaults = box.linters::rhino_default_linters,
line_length_linter = line_length_linter(100)
)
rhino::lint_r()
Lint result
Linter 'box_mod_fun_exists_linter' failed in /home/osenan/Documents/Apptests/box_issues/tests/testthat/test-two-numbers.R: unable to load module “logic/init”; not found in “/home/osenan/Documents/Apptests/box_issues”, “/home/osenan/.cache/R/renv/cache/v5/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/box/1.2.0/d94049c1d9446b0abb413fde9e82a505/box/mod”, “/home/osenan/Documents/Apptests/box_issues”
There is an error in loading because it does not follows the working directory change
Expected result
lint_r
shuold have been executed (could find or not style errors)The text was updated successfully, but these errors were encountered: