From b688f087022793b28843bcde3e41c87b23b8ac96 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Mon, 18 Mar 2024 17:21:09 +0800 Subject: [PATCH 1/5] update pre-commit config --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 869a3ef8a..4c4b8b1b3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ default_language_version: repos: - repo: https://github.com/lorenzwalthert/precommit - rev: v0.3.2.9027 + rev: v0.4.0 hooks: - id: style-files args: @@ -101,7 +101,7 @@ repos: )$ - id: pkgdown - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-added-large-files args: ["--maxkb=200"] @@ -119,7 +119,7 @@ repos: tests/testthat/_snaps/.*| )$ - repo: https://github.com/lorenzwalthert/gitignore-tidy - rev: 475bf5d96927a1887ce2863ff3075b1d7240bc51 + rev: 517cddbf1d8514ddaf43159686617ae65895dc99 hooks: - id: tidy-gitignore - repo: local From 39a35eafbb6a11bc682679e8ed9cc5d0232ee39c Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Mon, 18 Mar 2024 13:54:01 +0100 Subject: [PATCH 2/5] also upload results in GHA for R CMD check --- .github/workflows/check-full.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-full.yaml b/.github/workflows/check-full.yaml index dfeb4cc4e..fac8ae20c 100644 --- a/.github/workflows/check-full.yaml +++ b/.github/workflows/check-full.yaml @@ -56,6 +56,7 @@ jobs: - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true + upload-results: true error-on: 'ifelse(getRversion() > "3.6", "warning", "note")' env: _R_CHECK_FORCE_SUGGESTS_: false From 12c88a4c590d9425126498149ba600a3e2275acf Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Thu, 21 Mar 2024 07:03:59 +0100 Subject: [PATCH 3/5] check with newer error message --- tests/testthat/test-parsing.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-parsing.R b/tests/testthat/test-parsing.R index f0a7bfcc4..4c6503494 100644 --- a/tests/testthat/test-parsing.R +++ b/tests/testthat/test-parsing.R @@ -29,9 +29,10 @@ test_that("CRLF EOLs fail with informative error", { test_that("mixed CRLF / LF EOLs fail", { + skip(getRversion() < "4.4") expect_error( style_text("a + 3 -4 -> x\nx + 2\r\n glück + 1"), - "unexpected input" + "unexpected invalid token" ) }) From 89ea11ac890878e6f0c652a79bbfe5ced6a763ea Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Thu, 21 Mar 2024 07:18:37 +0100 Subject: [PATCH 4/5] cover older versions as well --- tests/testthat/test-parsing.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-parsing.R b/tests/testthat/test-parsing.R index 4c6503494..18876da8e 100644 --- a/tests/testthat/test-parsing.R +++ b/tests/testthat/test-parsing.R @@ -29,10 +29,10 @@ test_that("CRLF EOLs fail with informative error", { test_that("mixed CRLF / LF EOLs fail", { - skip(getRversion() < "4.4") + error_msg_stem <- if (getRversion() < "4.4") "unexpected input" else "unexpected invalid token" expect_error( style_text("a + 3 -4 -> x\nx + 2\r\n glück + 1"), - "unexpected invalid token" + error_msg_stem ) }) From 8d7063312b687608f0dfc0a1141a6dcd45ae5dc3 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert <10477073+lorenzwalthert@users.noreply.github.com> Date: Thu, 21 Mar 2024 22:14:31 +0800 Subject: [PATCH 5/5] undo unrelated upload --- .github/workflows/check-full.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-full.yaml b/.github/workflows/check-full.yaml index fac8ae20c..dfeb4cc4e 100644 --- a/.github/workflows/check-full.yaml +++ b/.github/workflows/check-full.yaml @@ -56,7 +56,6 @@ jobs: - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true - upload-results: true error-on: 'ifelse(getRversion() > "3.6", "warning", "note")' env: _R_CHECK_FORCE_SUGGESTS_: false