diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 477b8c4b..ab17c128 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -2,30 +2,13 @@ name: Spellcheck on: pull_request: {branches: ['main']} jobs: - Spelling: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on runs-on: ubuntu-latest - container: {image: "rocker/tidyverse:4.3.1"} + # Steps represent a sequence of tasks that will be executed as part of the job steps: - - name: Checkout repo - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Install packages - run: | - if (!require("roxygen2")) install.packages("roxygen2") - if (!require("spelling")) install.packages("spelling") - if (!require("testthat")) install.packages("testthat") - shell: Rscript {0} - - - name: Check spelling - run: | - testthat::test_that(desc = "Check spelling", - code = { - typos <- spelling::spell_check_files(list.files(pattern = ".*.qmd$", recursive = TRUE), ignore = readr::read_lines("inst/WORDLIST.txt")) - print(typos) - testthat::expect_equal( - object = typos, - expected = spelling::spell_check_files(path = "inst/WORDLIST.txt", ignore = readr::read_lines("inst/WORDLIST.txt")) - ) - } - ) - shell: Rscript {0} + - name: GitHub Spellcheck + uses: igsekor/pyspelling-any@v1.0.4 diff --git a/.spellcheck.yml b/.spellcheck.yml new file mode 100644 index 00000000..c0ff9ff6 --- /dev/null +++ b/.spellcheck.yml @@ -0,0 +1,18 @@ +matrix: +- name: Markdown + sources: + - '**/*.qmd' + default_encoding: utf-8 + aspell: + lang: en + dictionary: + wordlists: + - inst/WORDLIST.txt + encoding: utf-8 + pipeline: + - pyspelling.filters.markdown: + - pyspelling.filters.html: + comments: false + ignores: + - code + - pre diff --git a/inst/WORDLIST.txt b/inst/WORDLIST.txt index 87ea7ab3..73b662db 100644 --- a/inst/WORDLIST.txt +++ b/inst/WORDLIST.txt @@ -848,3 +848,36 @@ curation requestor pageId viewpage +dataset +datasets +txt +Ży +pdf +webpage +hoc +POSIX +covariate +Covariates +covariates +Covariates +PHUSE’s +NAs +dataframe +subsetted +subsetting +rbind +pdf +backend +APIs +pdf +sqrt +url +rbind +Taşl +çukur +Ży +Ży +unix +PHUSE’s +Żyła +Taşlıçukur