Open SaintRod opened 2 months ago
PS. I'm not using box.linters with rhino
I came here to post the same error. This is not because of numeric prefixing, but because of the use of backticks, which are required because starting a variable name with numbers is not valid in R.
Note that this also fails using the {box}
recommended testing approach, where __test__
modules are nested in every module and are called in the module __init__.R
file like so:
if (is.null(box::name())) {
box::use(./`__tests__`)
}
For now I am going to simply rename the testing directory to tests
, but clearly this isn't desirable behavior as {box}
allows backticked module names and in some areas recommends their usage.
box.linters version
0.10.5
Sample source code to lint
Assume test.R is a file with the below box import statement and 01_example.R is some file that exports stuff.
Sometimes it's useful to add a numeric prefix to indicate the order of operations.
The below
box::use
call doesn't fail but the box.linters does.Lint command used
Lint result
Expected result
If box doesn't return an error, then its linters probably shouldn't either.
If the numeric prefix naming convention isn't recommended, then that's what the lint should say.