Fix box_usage_linter working dir resolution; add R6 inheritance support#189
Fix box_usage_linter working dir resolution; add R6 inheritance support#189dereckmezquita wants to merge 1 commit into
Conversation
…nce support (#1) * Fix dir resolution when getting modules from outside dir. * First draft to support R6 inheritance linting. * Added support for R6 inheritence linting across files and to packages too. * Docs updates and build. * Docs updates and build.
|
Fixes #150, #157, and #188.
box_usage_linter— working dir fixbox_usage_linter()didn't set the working directory before resolving module exports, solint_dir()from a parent directory produced false positives onmodule$function()calls.Applied the same
withr::with_dir(get_module_working_dir(...))pattern that the other module linters already use. 3 lines changed.r6_usage_linter— inheritancer6_usage_linter()ignored theinheritparamater entirely, flagging all inherited method calls as invalid.Added
get_r6_inherited_components()which resolves parent class components from:box::use()(alias$Classand[Class]patterns)Includes cycle protection. Switched to file-level linting and scoped XPaths with
.//to handle mutliple R6 classes per file.Tests
R CMD check: 0 errors, 0 warnings, 0 notes