use_spell_check.RdThis workflow will run the spell_check_package() function from the spelling package on the current package, and will fail if any spelling errors are found. It will also run the spell_check_files() on specified file types if spell_check_additional_files is TRUE.
use_spell_check(
workflow_name = "call-spell-check.yml",
build_trigger = "pull_request",
spell_check_additional_files = FALSE,
spell_check_report_level = c("error", "warning"),
tag_ghactions4r = NULL
)What to name the github action workflow locally. Must
have the file extension .yml
Select the event that triggers the workflow. Options are:
pull_requestRun when a pull request is opened, reopened, or updated (default)
push_to_mainRun on pushing commits to main
push_to_all_branchesRun on pushing commits to any branch
manuallyRun manually with the workflow_dispatch trigger
weeklyRun on the default branch (usually main) once a week
Multiple build triggers are allowed; specify them as a vector. Note that invalid build triggers will be silently removed as long as one build trigger is specified correctly.
Logical. Should the workflow run spell_check_files() on specified files
in the package? Defaults to FALSE.
Character. The level of the report to generate for the additional spell check. Options are "warning" or "error". Defaults to "error". If set to "error", the workflow will fail if any spelling errors are found. If set to "warning", the the workflow will pass even if spelling errors are found.
Tag of ghactions4r workflow to pin to for the reusable workflow. This ensures compatibility with a specific version of ghactions4r functions. The tradeoff is that fixes will not happen automatically; instead, the user will have to update the pinned version of the caller workflow used. See the options by looking at the ghactions4r tags. Another option is to pin to commit hashes, but the user will need to do this by manually editing the caller workflow after creation. See github documentation on security to understand how this is more secure. Again, the tradeoff is that the workflow will not be automatically updated.