Skip to content

Commit

Permalink
Merge branch 'main' into buildignore-dotlintr
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil authored Sep 15, 2023
2 parents 299a2e6 + 9af53f1 commit 7f5ae47
Show file tree
Hide file tree
Showing 291 changed files with 8,024 additions and 2,839 deletions.
22 changes: 14 additions & 8 deletions .dev/revdep_compare_releases.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ library(glue)
if (!file.exists("revdep-repos")) {
stop("Please run .dev/revdep_get_repos.R first before running this")
}
withr::local_options(width = 180)
repo_data <- rbind(
data.table::fread("revdep-repos"),
# land after the initial lines of comments on the header line
Expand All @@ -24,7 +25,7 @@ if (length(failed_install) > 0L) {

dev_dir <- getwd()
dev_branch <- system2("git", c("rev-parse", "--abbrev-ref", "HEAD"), stdout = TRUE)
old_release <- "v2.0.1"
old_release <- "v3.0.2"
main <- "main"

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

NULL
invisible()
}

# ---- Main linting execution ----
Expand All @@ -229,12 +230,17 @@ main_only <- setdiff(basename(main_results), basename(old_results))
old_only <- setdiff(basename(old_results), basename(main_results))
shared <- intersect(basename(main_results), basename(old_results))

message("The following packages warned on ", main, " only: ")
message(" ", toString(match_and_strip(main_only, "\\.warnings$")), "\n")
message("The following packages warned on ", old_release, " only: ")
message(" ", toString(match_and_strip(old_only, "\\.warnings$")), "\n")
message("The following packages warned on both branches: ")
message(" ", toString(match_and_strip(shared, "\\.warnings$")), "\n")
summarize_warned <- function(warned, label) {
message("The following packages warned on ", label, ":")
if (length(warned) > 0) {
message(" ", toString(match_and_strip(warned, "\\.warnings$")), "\n")
} else {
message(" None! 🎉")
}
}
summarize_warned(main_only, "main only")
summarize_warned(old_only, paste(old_release, "only"))
summarize_warned(shared, "both branches")

main_only <- grep("warnings$", main_only, invert = TRUE, value = TRUE)
old_only <- grep("warnings$", old_only, invert = TRUE, value = TRUE)
Expand Down
15 changes: 15 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This Dependabot configuration is designed to keep GitHub Actions dependencies up-to-date
# by running weekly checks and creating pull requests to update them as needed.
#
# This ensures that the GitHub Actions workflows remain compatible with the latest versions
# of their dependencies, potentially improving the stability and security of automation processes.
#
# For more, see:
# https://docs.github.com/en/code-security/dependabot/dependabot-alerts/about-dependabot-alerts
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check-hard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:

name: R-CMD-check

concurrency:
group: ${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
Expand Down Expand Up @@ -39,7 +43,7 @@ jobs:
- {os: ubuntu-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'oldrel-3'}
- {os: ubuntu-latest, r: 'oldrel-4'}
- {os: ubuntu-latest, r: '3.4'}
- {os: ubuntu-latest, r: '3.5'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -58,7 +62,7 @@ jobs:
sudo locale-gen zh_CN
echo "LC_ALL=zh_CN" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand All @@ -73,9 +77,6 @@ jobs:
with:
extra-packages: |
any::rcmdcheck
bookdown=?ignore-before-r=3.5.0
patrick=?ignore-before-r=3.5.0
purrr=?ignore-before-r=3.5.0
needs: check

- uses: r-lib/actions/check-r-package@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-all-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-link-rot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/lint-changed-files.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -28,3 +28,5 @@ jobs:
- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand All @@ -39,7 +39,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
clean: false
branch: gh-pages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-package-vigilant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
62 changes: 48 additions & 14 deletions .lintr
Original file line number Diff line number Diff line change
@@ -1,16 +1,50 @@
linters: linters_with_defaults(
line_length_linter(120),
implicit_integer_linter(),
backport_linter("oldrel-4", except = c("R_user_dir", "str2lang", "str2expression", "deparse1"))
)
any_duplicated_linter(),
any_is_na_linter(),
backport_linter("oldrel-4", except = c("R_user_dir", "str2lang", "str2expression", "deparse1", "...names")),
consecutive_assertion_linter(),
expect_comparison_linter(),
expect_identical_linter(),
expect_length_linter(),
expect_named_linter(),
expect_not_linter(),
expect_null_linter(),
expect_s3_class_linter(),
expect_s4_class_linter(),
expect_true_false_linter(),
expect_type_linter(),
fixed_regex_linter(),
for_loop_index_linter(),
if_not_else_linter(),
implicit_assignment_linter(),
implicit_integer_linter(),
keyword_quote_linter(),
lengths_linter(),
line_length_linter(120),
missing_argument_linter(),
nested_ifelse_linter(),
numeric_leading_zero_linter(),
outer_negation_linter(),
paste_linter(),
redundant_equals_linter(),
redundant_ifelse_linter(),
sort_linter(),
sprintf_linter(),
strings_as_factors_linter(),
undesirable_function_linter(c(Sys.setenv = NA_character_)),
unnecessary_nested_if_linter(),
unnecessary_lambda_linter(),
unnecessary_concatenation_linter(allow_single_expression = FALSE),
yoda_test_linter()
)
exclusions: list(
"inst/doc/creating_linters.R" = 1,
"inst/example/bad.R",
"tests/testthat/default_linter_testcode.R",
"tests/testthat/dummy_packages",
"tests/testthat/dummy_projects",
"tests/testthat/exclusions-test",
"tests/testthat/knitr_extended_formats",
"tests/testthat/knitr_formats",
"tests/testthat/knitr_malformed"
)
"inst/doc/creating_linters.R" = 1,
"inst/example/bad.R",
"tests/testthat/default_linter_testcode.R",
"tests/testthat/dummy_packages",
"tests/testthat/dummy_projects",
"tests/testthat/exclusions-test",
"tests/testthat/knitr_extended_formats",
"tests/testthat/knitr_formats",
"tests/testthat/knitr_malformed"
)
43 changes: 0 additions & 43 deletions .lintr_new

This file was deleted.

Loading

0 comments on commit 7f5ae47

Please sign in to comment.