Fix more lints (#884) #153
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# Trigger once a week at 00:00 on Sunday | |
- cron: "0 0 * * SUN" | |
name: check-spelling | |
jobs: | |
check-spelling: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
with: | |
pandoc-version: "3.1.8" | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: "release" | |
http-user-agent: "release" | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
pak-version: devel | |
dependencies: '"hard"' | |
extra-packages: | | |
any::rcmdcheck | |
any::spelling | |
- name: Spell check | |
run: | | |
options(crayon.enabled = TRUE) | |
spelling_mistakes <- spelling::spell_check_package() | |
cli::cli_rule() | |
if (length(spelling_mistakes$word) > 0L) { | |
print(spelling_mistakes) | |
cli::cli_abort("Spelling errors found. Either correct them or update `inst/WORDLIST` file.") | |
} else { | |
cli::cli_alert_success("No spelling errors found.") | |
} | |
cli::cli_rule() | |
shell: Rscript {0} |