roxylint

Lint 'roxygen2'-generated documentation

https://github.com/openpharma/roxylint

Science Score: 13.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
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.4%) to scientific vocabulary

Keywords

linter r roxygen2
Last synced: 6 months ago · JSON representation

Repository

Lint 'roxygen2'-generated documentation

Basic Info
Statistics
  • Stars: 16
  • Watchers: 2
  • Forks: 0
  • Open Issues: 5
  • Releases: 1
Topics
linter r roxygen2
Created about 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

roxylint

R-CMD-check <!-- badges: end -->

Lint 'roxygen2'-generated documentation

Quick Start

Modify your package's description file to add required package for your roxygen2 documentation

DESCRIPTION Config/Needs/documentation: roxylint Roxygen: list(markdown = TRUE, roclets = c("namespace", "rd", "roxylint::roxylint"))

By default, this will add linters for the tidyverse style guide. If you'd like to be explicit, you can declare this style yourself:

DESCRIPTION Config/roxylint: list(linters = roxylint::tidy)

Now, the next time you document your package, you might see some messages about your formatting!

Tune your Linting

You can add in your own linters easily. Simply modify the linters field in the configuration list. Of course, if you feel that your linter would be more widely useful, feel free to open up a pull request to introduce it.

However, since structuring code in the DESCRIPTION file is not very pleasant, you can instead store your configurations in man/roxylint/meta.R.

For example, it might look something like this:

man/roxytypes/meta.R ```r list( linters = list( # pick and choose your tidy lints return = roxylint::lintsentencecase,

# use regular expressions to set simple rules
title = "!!!$",

# add custom messages with named lists
details = list(
  "should be in 'ALL CAPS'" = "^[[:upper:] ]*$"
),

# use functions for fine-grained control
param = function(x, name, description, ...) {
  n_caps <- nchar(gsub("[^[:upper:]]", "", description))
  if (n_caps < nchar(description) / 2)
    warning("descriptions should be at least 50% CaPiTALiZeD")
},

# use multiple rules in a list
section = list(
  "should not have frowny faces" = ":\\(",
  function(x, ...) if (grepl(":\\)", x$raw)) message("nice! very happy :)")
),

# prevent other packages from registering rules with a `NULL`
yell = NULL,

# or prevent aditional rules by ending a list with a `NULL`
return = list(
  "^Returns ",
  NULL
)

) ) ```

With these in place, you'll start getting alerts when you're deviating from your style.

ℹ [check_linter.R:1] @title raw value does not match '!!!$' ℹ [check_linter.R:6] @param descriptions should be at least 50% CaPiTALiZeD ℹ [check_linter.R:13] @return descriptions should be 'Sentence case' and end in a period

Register Linters

If you're building a package that provides its own roxygen2 tags, you can also register default linters.

DESCRIPTION Enhances: roxylint

r .onLoad <- function(libname, pkgname) { if (requireNamespace("roxylint", quietly = TRUE)) { roxylint::register_linters( yell = "^[[:upper:] ]*$" ) } }

Owner

  • Name: openpharma
  • Login: openpharma
  • Kind: organization

Further precompetitive collaboration in life sciences

GitHub Events

Total
  • Watch event: 2
  • Pull request event: 1
Last Year
  • Watch event: 2
  • Pull request event: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 5
  • Total pull requests: 3
  • Average time to close issues: 14 days
  • Average time to close pull requests: 3 minutes
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 1.8
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 4.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dgkf (3)
  • wjakethompson (1)
  • danielinteractive (1)
Pull Request Authors
  • dgkf (3)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 167 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: roxylint

Lint 'roxygen2'-Generated Documentation

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 167 Last month
Rankings
Dependent packages count: 28.2%
Dependent repos count: 36.2%
Average: 49.7%
Downloads: 84.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 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/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • cli * imports
  • roxygen2 * imports
  • utils * imports