box.linters

lintr-compatible linters for box modules in R

https://github.com/appsilon/box.linters

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.0%) to scientific vocabulary

Keywords

box linter r rhinoverse shiny
Last synced: 6 months ago · JSON representation

Repository

lintr-compatible linters for box modules in R

Basic Info
Statistics
  • Stars: 10
  • Watchers: 9
  • Forks: 2
  • Open Issues: 26
  • Releases: 6
Topics
box linter r rhinoverse shiny
Created almost 2 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog

README.md

box.linters box.linters logo

lintr-compatible linters for box modules in R

CRAN status R-CMD-check Codecov test coverage <!-- badges: end -->

box.linters is an R package that provides the {lintr} package compatibility with {box} package modules. In addition to providing code-styling checks for box::use() function calls, box.linters includes a collection of linter functions to replace lintr::object_usage_linter().

While the primary purpose of {box.linters} is for use with the {rhino} package, its functions and features are available for use with any R code or project that uses the {box} package for modular R code.

Motivation

lintr::object_usage_linter is not compatible with {box} modules.

```r

use of box modules

box::use( stringr[...] )

somefunction <- function() { strtrim(" String with trailing and leading white space\t") } ```

```

lintr::lint(box-module.R) :6:3: warning: [objectusagelinter] no visible global function definition for 'strtrim' strtrim(" String with trailing and leading white space ") ^~~~~~~~ ```

In order to use lintr and box together, it was necessary to disable lintr::object_usage_linter():

r lintr::lint(box-module.R, linters = lintr::linters_with_defaults(object_usage_linter = NULL))

However, this meant we lose the functionality provided by lintr::object_usage_linter().

Installation

Stable version:

r install.packages("box.linters")

Development version:

```r

install.packages("remotes")

remotes::install_github("Appsilon/box.linters") ```

Usage

Create a configuration file and run selected linters:

.lintr setup

```r

create a .lintr file

box.linters::useboxlintr()

a file:

lintr::lint(filename.R)

in a project:

lintr::lint_dir() ```

Manually

Or, use box.linters manually with lintr:

```r

a file:

lintr::lint(filename.R, linters = box.linters::boxdefaultlinters)

in a project:

lintr::lintdir(linters = box.linters::boxdefault_linters) ```

Rhino

Or, use box.linters from within a {rhino} project:

```r

a .lintr file should already exist when a rhino project is created

box.linters::useboxlintr(type = "rhino")

in a rhino project:

rhino::lint_r() ```

{glue} String Interpolation

{box.linters} also looks inside {glue} strings. The default opening and closing delimiters are "{" and "}". {glue} provides a way to customize delimiters. Support for custom {glue} delimiters are provided project-wide by setting glue.open and glue.close options in the following manner:

r options( list( glue.open = "<<", glue.close = ">>" ) )

This is consistent with glue::glue(), doubling the full delimiter escapes it.

Because setting glue.open and glue.close will be global or project-wide, it is advised to invoke glue in the following manner to avoid confusion:

r glue::glue(..., .open = getOption("glue.open"), .close = getOption("glue.close"))

Contribute

If you want to contribute to this project, please submit a regular PR, once you're done with the new feature or bug fix.

Reporting a bug is also helpful - please use Github issues and describe your problem as detailed as possible.

Appsilon

Appsilon is a Posit (formerly RStudio) Full Service Certified Partner.
Learn more at appsilon.com.

Get in touch opensource@appsilon.com

Explore the Rhinoverse - a family of R packages built around Rhino!

Subscribe for Shiny tutorials, exclusive articles, R/Shiny community events, and more.

Owner

  • Name: Appsilon
  • Login: Appsilon
  • Kind: organization
  • Email: hello@appsilon.com
  • Location: Warsaw, Poland

We're hiring! https://appsilon.com/careers

GitHub Events

Total
  • Create event: 22
  • Issues event: 21
  • Release event: 3
  • Delete event: 13
  • Issue comment event: 35
  • Push event: 54
  • Pull request review comment event: 9
  • Pull request review event: 18
  • Pull request event: 26
  • Fork event: 2
Last Year
  • Create event: 22
  • Issues event: 21
  • Release event: 3
  • Delete event: 13
  • Issue comment event: 35
  • Push event: 54
  • Pull request review comment event: 9
  • Pull request review event: 18
  • Pull request event: 26
  • Fork event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 231
  • Total Committers: 5
  • Avg Commits per committer: 46.2
  • Development Distribution Score (DDS): 0.052
Past Year
  • Commits: 31
  • Committers: 4
  • Avg Commits per committer: 7.75
  • Development Distribution Score (DDS): 0.226
Top Committers
Name Email Commits
Rodrigo Basa r****o@a****m 219
Jakub Nowicki k****a@a****m 8
G. Vituri v****i@g****m 2
Mateusz Kołomański 6****i 1
Kamil Zyla k****l@a****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 54
  • Total pull requests: 63
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 12
  • Total pull request authors: 5
  • Average comments per issue: 1.35
  • Average comments per pull request: 1.1
  • Merged pull requests: 56
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 20
  • Pull requests: 31
  • Average time to close issues: 3 months
  • Average time to close pull requests: 16 days
  • Issue authors: 8
  • Pull request authors: 2
  • Average comments per issue: 1.2
  • Average comments per pull request: 0.97
  • Merged pull requests: 25
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • radbasa (73)
  • TymekDev (6)
  • caldwellst (5)
  • Gotfrid (4)
  • tyner (2)
  • SaintRod (2)
  • pstorozenko (1)
  • FrauH0lle (1)
  • AshesITR (1)
  • osenan (1)
  • DeepanshKhurana (1)
  • vibalre (1)
Pull Request Authors
  • radbasa (101)
  • jakubnowicki (11)
  • vituri (6)
  • kamilzyla (2)
  • m-kolomanski (2)
  • mend-bolt-for-github[bot] (1)
  • renovate[bot] (1)
Top Labels
Issue Labels
enhancement (6) bug (5) good first issue (2)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 1,007 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 8
  • Total maintainers: 1
cran.r-project.org: box.linters

Linters for 'box' Modules

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,007 Last month
Rankings
Dependent packages count: 28.9%
Dependent repos count: 35.6%
Average: 49.9%
Downloads: 85.2%
Last synced: 6 months ago

Dependencies

.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 2.10 depends
  • covr * suggests
  • lintr * suggests
  • rcmdcheck * suggests
  • rex * suggests
  • spelling * suggests
  • testthat >= 3.0.0 suggests