box.linters is a collection of linters designed for projects that use the box module system. It extends the functionality of lintr, providing static analysis that understands the import and export conventions used by box. The package helps developers identify coding errors, enforce consistent styling and detect problems that conventional linting tools may overlook.
The box package provides a modular approach to organising code, with functions and objects imported from packages and local modules using box::use(). However, lintr’s standard object usage analysis does not fully understand this mechanism. Consequently, correctly imported functions can be incorrectly reported as undefined. Disabling the conventional object usage linter avoids these false positives but also removes useful checks. box.linters addresses this problem with replacement functions that understand how box modules resolve names and references.
Although primarily developed for use with Appsilon’s Rhino framework for Shiny applications, box.linters can be used independently in other projects that adopt box modules. It integrates with existing lintr workflows, supporting analysis of individual source files and entire projects through predefined or customised linting configurations.
This is free and open source software.
Key Features
- Detect unused imported modules, packages, functions and objects.
- Identify references to functions and objects that do not exist or are not exported.
- Check for undefined functions and unused declarations in local source code.
- Enforce alphabetical ordering of box::use() imports.
- Check that package and module imports are separated appropriately.
- Enforce trailing commas in import declarations.
- Restrict universal imports and limit the number of functions imported.
- Detect namespaced function calls that bypass the preferred module import conventions.
- Understand object usage within R6 classes and destructuring expressions.
- Analyse references inside glue string interpolation, including configurable delimiters.
- Style box::use() declarations in source files, directories or supplied text.
- Provide predefined linter configurations for box-based projects and Rhino applications.
Website: github.com/Appsilon/box.linters
Support:
Developer: Ricardo Rodrigo Basa, Jakub Nowicki (Appsilon)
License: GNU Lesser General Public License v3.0
box.linters is written in R. Learn R with our recommended free books and free tutorials.
Related Software
| R Linters | |
|---|---|
| lintr | Provides static code analysis for R |
| jarl | Fast linter for R |
| flir | Parse and rewrite R code |
| flowR | Sophisticated, static dataflow analyzer |
| checkglobals | R package that performs static analysis of R source code dependencies |
| scilintr | Collection of scientific linting tools |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.