Skip to content

[LINT_BUG]: Handle non-syntactic function and object names (back ticks) #147

@SaintRod

Description

@SaintRod

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.

box::use(
  . / `01_example`[...],
)

Lint command used

box::use(
  box.linters[box_default_linters],
  here[here],
  lintr[lint],
)

lint(
  filename = here("test.R"),
  linters = box_default_linters$box_unused_attached_mod_linter
)

Lint result

Error: Linter 'box_unused_attached_mod_linter' failed in ./test.R: <text>:1:5: unexpected input
1: ./01_
        ^

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions