From 04cceefed2a3d93b3f2e2a18201e24f98a369c3a Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Wed, 24 Aug 2022 07:02:32 +0200 Subject: [PATCH 1/3] Add GHA workflow for checking valid HTML5 docs To know more about new HTML5 check in R-devel, see: https://blog.r-project.org/2022/04/08/enhancements-to-html-documentation/ Workflow from: https://github.com/r-lib/actions/blob/v2-branch/examples/html-5-check.yaml --- .github/workflows/html-5-check.yaml | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/html-5-check.yaml diff --git a/.github/workflows/html-5-check.yaml b/.github/workflows/html-5-check.yaml new file mode 100644 index 000000000..5d81a725a --- /dev/null +++ b/.github/workflows/html-5-check.yaml @@ -0,0 +1,44 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: HTML5 check + +jobs: + HTML5-check: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: 'devel' + http-user-agent: 'release' + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + dependencies: 'character()' + + - name: Install pdflatex + run: sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra + + - name: Install tidy + run: sudo apt install tidy + + - uses: r-lib/actions/check-r-package@v2 + with: + args: 'c("--as-cran", "--no-codoc", "--no-examples", "--no-tests", "--no-vignettes", "--no-build-vignettes", "--ignore-vignettes", "--no-install")' + build_args: 'c("--no-build-vignettes")' + error-on: '"note"' + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + _R_CHECK_CRAN_INCOMING_: false From 8f6f2e96415adbde381ec12611028c1ac23f9c89 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Wed, 24 Aug 2022 07:12:48 +0200 Subject: [PATCH 2/3] update docs for `is_shebang()` --- R/expr-is.R | 2 +- man/is_shebang.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/expr-is.R b/R/expr-is.R index 896333912..77eb15b94 100644 --- a/R/expr-is.R +++ b/R/expr-is.R @@ -103,7 +103,7 @@ is_subset_expr <- function(pd) { #' Identify comments that are shebangs #' #' Shebangs should be preserved and no space should be inserted between -#' \# and !. A comment is a shebang if it is the first top level token +#' `#` and `!`. A comment is a shebang if it is the first top level token #' (identified with `pos_id`) and if it starts with `#!`. #' @param pd A parse table. #' @examples diff --git a/man/is_shebang.Rd b/man/is_shebang.Rd index 52f756769..a718d2abe 100644 --- a/man/is_shebang.Rd +++ b/man/is_shebang.Rd @@ -11,7 +11,7 @@ is_shebang(pd) } \description{ Shebangs should be preserved and no space should be inserted between -\# and !. A comment is a shebang if it is the first top level token +\verb{#} and \code{!}. A comment is a shebang if it is the first top level token (identified with \code{pos_id}) and if it starts with \verb{#!}. } \examples{ From c1ad92eb6cc916a32a6efb254f70afcb473e7d52 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Wed, 24 Aug 2022 09:57:44 +0200 Subject: [PATCH 3/3] Adapt existing workflow --- .github/workflows/check-full.yaml | 4 ++- .github/workflows/html-5-check.yaml | 44 ----------------------------- 2 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/html-5-check.yaml diff --git a/.github/workflows/check-full.yaml b/.github/workflows/check-full.yaml index 36884035c..dc4fb8f58 100644 --- a/.github/workflows/check-full.yaml +++ b/.github/workflows/check-full.yaml @@ -51,10 +51,12 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::rcmdcheck, data.tree=?ignore-before-r=3.5.0 + extra-packages: any::rcmdcheck needs: check - uses: r-lib/actions/check-r-package@v2 + with: + error-on: '"note"' env: _R_CHECK_FORCE_SUGGESTS_: false diff --git a/.github/workflows/html-5-check.yaml b/.github/workflows/html-5-check.yaml deleted file mode 100644 index 5d81a725a..000000000 --- a/.github/workflows/html-5-check.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -name: HTML5 check - -jobs: - HTML5-check: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: 'devel' - http-user-agent: 'release' - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::rcmdcheck - dependencies: 'character()' - - - name: Install pdflatex - run: sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra - - - name: Install tidy - run: sudo apt install tidy - - - uses: r-lib/actions/check-r-package@v2 - with: - args: 'c("--as-cran", "--no-codoc", "--no-examples", "--no-tests", "--no-vignettes", "--no-build-vignettes", "--ignore-vignettes", "--no-install")' - build_args: 'c("--no-build-vignettes")' - error-on: '"note"' - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - _R_CHECK_CRAN_INCOMING_: false