Skip to content

Commit 7f5ae47

Browse files
Merge branch 'main' into buildignore-dotlintr
2 parents 299a2e6 + 9af53f1 commit 7f5ae47

File tree

291 files changed

+8024
-2839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

291 files changed

+8024
-2839
lines changed

.dev/revdep_compare_releases.R

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ library(glue)
77
if (!file.exists("revdep-repos")) {
88
stop("Please run .dev/revdep_get_repos.R first before running this")
99
}
10+
withr::local_options(width = 180)
1011
repo_data <- rbind(
1112
data.table::fread("revdep-repos"),
1213
# land after the initial lines of comments on the header line
@@ -24,7 +25,7 @@ if (length(failed_install) > 0L) {
2425

2526
dev_dir <- getwd()
2627
dev_branch <- system2("git", c("rev-parse", "--abbrev-ref", "HEAD"), stdout = TRUE)
27-
old_release <- "v2.0.1"
28+
old_release <- "v3.0.2"
2829
main <- "main"
2930

3031
all_repos <- repo_data$repo
@@ -208,7 +209,7 @@ summarize_lint_delta <- function(new, old) {
208209
][, .(line = sprintf("%s [%s]", line, linter), location = paste0(package, ":", filename))
209210
][, print(.SD)]
210211

211-
NULL
212+
invisible()
212213
}
213214

214215
# ---- Main linting execution ----
@@ -229,12 +230,17 @@ main_only <- setdiff(basename(main_results), basename(old_results))
229230
old_only <- setdiff(basename(old_results), basename(main_results))
230231
shared <- intersect(basename(main_results), basename(old_results))
231232

232-
message("The following packages warned on ", main, " only: ")
233-
message(" ", toString(match_and_strip(main_only, "\\.warnings$")), "\n")
234-
message("The following packages warned on ", old_release, " only: ")
235-
message(" ", toString(match_and_strip(old_only, "\\.warnings$")), "\n")
236-
message("The following packages warned on both branches: ")
237-
message(" ", toString(match_and_strip(shared, "\\.warnings$")), "\n")
233+
summarize_warned <- function(warned, label) {
234+
message("The following packages warned on ", label, ":")
235+
if (length(warned) > 0) {
236+
message(" ", toString(match_and_strip(warned, "\\.warnings$")), "\n")
237+
} else {
238+
message(" None! 🎉")
239+
}
240+
}
241+
summarize_warned(main_only, "main only")
242+
summarize_warned(old_only, paste(old_release, "only"))
243+
summarize_warned(shared, "both branches")
238244

239245
main_only <- grep("warnings$", main_only, invert = TRUE, value = TRUE)
240246
old_only <- grep("warnings$", old_only, invert = TRUE, value = TRUE)

.github/dependabot.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This Dependabot configuration is designed to keep GitHub Actions dependencies up-to-date
2+
# by running weekly checks and creating pull requests to update them as needed.
3+
#
4+
# This ensures that the GitHub Actions workflows remain compatible with the latest versions
5+
# of their dependencies, potentially improving the stability and security of automation processes.
6+
#
7+
# For more, see:
8+
# https://docs.github.com/en/code-security/dependabot/dependabot-alerts/about-dependabot-alerts
9+
version: 2
10+
11+
updates:
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"

.github/workflows/R-CMD-check-hard.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
R_KEEP_PKG_SOURCE: yes
3737

3838
steps:
39-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v4
4040

4141
- uses: r-lib/actions/setup-pandoc@v2
4242

.github/workflows/R-CMD-check.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212

1313
name: R-CMD-check
1414

15+
concurrency:
16+
group: ${{ github.event.pull_request.number || github.run_id }}
17+
cancel-in-progress: true
18+
1519
jobs:
1620
R-CMD-check:
1721
runs-on: ${{ matrix.config.os }}
@@ -39,7 +43,7 @@ jobs:
3943
- {os: ubuntu-latest, r: 'oldrel-2'}
4044
- {os: ubuntu-latest, r: 'oldrel-3'}
4145
- {os: ubuntu-latest, r: 'oldrel-4'}
42-
- {os: ubuntu-latest, r: '3.4'}
46+
- {os: ubuntu-latest, r: '3.5'}
4347

4448
env:
4549
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
@@ -58,7 +62,7 @@ jobs:
5862
sudo locale-gen zh_CN
5963
echo "LC_ALL=zh_CN" >> $GITHUB_ENV
6064
61-
- uses: actions/checkout@v3
65+
- uses: actions/checkout@v4
6266

6367
- uses: r-lib/actions/setup-pandoc@v2
6468

@@ -73,9 +77,6 @@ jobs:
7377
with:
7478
extra-packages: |
7579
any::rcmdcheck
76-
bookdown=?ignore-before-r=3.5.0
77-
patrick=?ignore-before-r=3.5.0
78-
purrr=?ignore-before-r=3.5.0
7980
needs: check
8081

8182
- uses: r-lib/actions/check-r-package@v2

.github/workflows/check-all-examples.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2323

2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626

2727
- uses: r-lib/actions/setup-r@v2
2828
with:

.github/workflows/check-link-rot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1414
R_KEEP_PKG_SOURCE: yes
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

1818
- uses: r-lib/actions/setup-pandoc@v2
1919

.github/workflows/lint-changed-files.yaml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/lint.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
env:
1313
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616

1717
- uses: r-lib/actions/setup-r@v2
1818
with:
@@ -28,3 +28,5 @@ jobs:
2828
- name: Lint
2929
run: lintr::lint_package()
3030
shell: Rscript {0}
31+
env:
32+
LINTR_ERROR_ON_LINT: true

.github/workflows/pkgdown.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
env:
2121
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424

2525
- uses: r-lib/actions/setup-pandoc@v2
2626

@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Deploy to GitHub pages 🚀
4141
if: github.event_name != 'pull_request'
42-
uses: JamesIves/[email protected].1
42+
uses: JamesIves/[email protected].3
4343
with:
4444
clean: false
4545
branch: gh-pages

.github/workflows/test-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919

2020
- uses: r-lib/actions/setup-r@v2
2121
with:

.github/workflows/test-package-vigilant.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818

1919
- uses: r-lib/actions/setup-r@v2
2020
with:

.lintr

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,50 @@
11
linters: linters_with_defaults(
2-
line_length_linter(120),
3-
implicit_integer_linter(),
4-
backport_linter("oldrel-4", except = c("R_user_dir", "str2lang", "str2expression", "deparse1"))
5-
)
2+
any_duplicated_linter(),
3+
any_is_na_linter(),
4+
backport_linter("oldrel-4", except = c("R_user_dir", "str2lang", "str2expression", "deparse1", "...names")),
5+
consecutive_assertion_linter(),
6+
expect_comparison_linter(),
7+
expect_identical_linter(),
8+
expect_length_linter(),
9+
expect_named_linter(),
10+
expect_not_linter(),
11+
expect_null_linter(),
12+
expect_s3_class_linter(),
13+
expect_s4_class_linter(),
14+
expect_true_false_linter(),
15+
expect_type_linter(),
16+
fixed_regex_linter(),
17+
for_loop_index_linter(),
18+
if_not_else_linter(),
19+
implicit_assignment_linter(),
20+
implicit_integer_linter(),
21+
keyword_quote_linter(),
22+
lengths_linter(),
23+
line_length_linter(120),
24+
missing_argument_linter(),
25+
nested_ifelse_linter(),
26+
numeric_leading_zero_linter(),
27+
outer_negation_linter(),
28+
paste_linter(),
29+
redundant_equals_linter(),
30+
redundant_ifelse_linter(),
31+
sort_linter(),
32+
sprintf_linter(),
33+
strings_as_factors_linter(),
34+
undesirable_function_linter(c(Sys.setenv = NA_character_)),
35+
unnecessary_nested_if_linter(),
36+
unnecessary_lambda_linter(),
37+
unnecessary_concatenation_linter(allow_single_expression = FALSE),
38+
yoda_test_linter()
39+
)
640
exclusions: list(
7-
"inst/doc/creating_linters.R" = 1,
8-
"inst/example/bad.R",
9-
"tests/testthat/default_linter_testcode.R",
10-
"tests/testthat/dummy_packages",
11-
"tests/testthat/dummy_projects",
12-
"tests/testthat/exclusions-test",
13-
"tests/testthat/knitr_extended_formats",
14-
"tests/testthat/knitr_formats",
15-
"tests/testthat/knitr_malformed"
16-
)
41+
"inst/doc/creating_linters.R" = 1,
42+
"inst/example/bad.R",
43+
"tests/testthat/default_linter_testcode.R",
44+
"tests/testthat/dummy_packages",
45+
"tests/testthat/dummy_projects",
46+
"tests/testthat/exclusions-test",
47+
"tests/testthat/knitr_extended_formats",
48+
"tests/testthat/knitr_formats",
49+
"tests/testthat/knitr_malformed"
50+
)

.lintr_new

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)