worcs_badge: Add WORCS badge to README.md

Description Usage Arguments Value Examples

View source: R/worcs_badge.R

Description

Evaluates whether a project meets the criteria of the WORCS checklist (see worcs_checklist), and adds a badge to the project's README.md.

Usage

1
2
3
4
5
worcs_badge(
  path = ".",
  update_readme = "README.md",
  update_csv = "checklist.csv"
)

Arguments

path

Character. This can either be the path to a WORCS project folder (a project with a .worcs file), or the path to a checklist.csv file. The latter is useful if you want to evaluate a manually updated checklist file. Default: '.' (path to current directory).

update_readme

Character. Path to the README.md file to add the badge to. Default: 'README.md'. Set to NULL to avoid updating the README.md file.

update_csv

Character. Path to the README.md file to add the badge to. Default: 'checklist.csv'. Set to NULL to avoid updating the checklist.csv file.

Value

No return value. This function is called for its side effects.

Examples

1
2
3
4
5
example_dir <- file.path(tempdir(), "badge")
dir.create(example_dir)
write("a", file.path(example_dir, ".worcs"))
worcs_badge(path = example_dir,
update_readme = NULL)

worcs documentation built on Feb. 2, 2021, 5:13 p.m.