Skip to content

What is the recommended approach with lintr object_usage_lintr? #327

Answered by klmr
stefanoborini asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately there’s no good way to make object_usage_linter happy. ‘box’ isn’t the only common use-case which generates issues, and I therefore (unfortunately) recommend disabling object_usage_linter entirely: the linter is fundamentally broken, and I don’t think it is fixable.

The ‘lintr’ package might be accept a patch adding support for ‘box’ (I have previously added ‘box’-specific handling to another linter, and the linter already has special handling for other R packages), but this wouldn’t fix the underlying issues that this linter has for other, common code, so I would still recommend against using it, even patched.

The issue is fundamentally that object_usage_linter (mostly1) re…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@stefanoborini
Comment options

@klmr
Comment options

@stefanoborini
Comment options

@klmr
Comment options

Answer selected by stefanoborini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants