diff --git a/.github/workflows/check-styling.yaml b/.github/workflows/check-styling.yaml deleted file mode 100644 index 91a4f07..0000000 --- a/.github/workflows/check-styling.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# To understand the aim and scope of this workflow, have a look at these slides: -# https://indrajeetpatil.github.io/preventive-r-package-care/ - -# name: check-styling - -on: - workflow_call: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} - cancel-in-progress: true - -jobs: - check-styling: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: Set up Air - uses: posit-dev/setup-air@482cb5912394878ab5a63b75db0f9d19cc6df5ba # v1 - - - name: Run air format - run: air format --check . diff --git a/.github/workflows/format-suggest.yaml b/.github/workflows/format-suggest.yaml deleted file mode 100644 index c2044c4..0000000 --- a/.github/workflows/format-suggest.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Workflow derived from https://github.com/posit-dev/setup-air/tree/main/examples - -# name: format-suggest - -on: - # Using `pull_request_target` over `pull_request` for elevated `GITHUB_TOKEN` - # privileges, otherwise we can't set `pull-requests: write` when the pull - # request comes from a fork, which is our main use case (external contributors). - # - # `pull_request_target` runs in the context of the target branch (`main`, usually), - # rather than in the context of the pull request like `pull_request` does. Due - # to this, we must explicitly checkout `ref: ${{ github.event.pull_request.head.sha }}`. - # This is typically frowned upon by GitHub, as it exposes you to potentially running - # untrusted code in a context where you have elevated privileges, but they explicitly - # call out the use case of reformatting and committing back / commenting on the PR - # as a situation that should be safe (because we aren't actually running the untrusted - # code, we are just treating it as passive data). - # https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/ - pull_request_target: - -name: format-suggest.yaml - -jobs: - format-suggest: - name: format-suggest - runs-on: ubuntu-latest - - permissions: - # Required to push suggestion comments to the PR - pull-requests: write - - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: Install - uses: posit-dev/setup-air@482cb5912394878ab5a63b75db0f9d19cc6df5ba # v1 - - - name: Format - run: air format . - - - name: Suggest - uses: reviewdog/action-suggester@fd22a83b1ebc13fd8aee5d57b06793fce6f20fb9 # v1 - with: - level: error - fail_level: error - tool_name: air diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml deleted file mode 100644 index 818b237..0000000 --- a/.github/workflows/lint.yaml +++ /dev/null @@ -1,72 +0,0 @@ -# To understand the aim and scope of this workflow, have a look at these slides: -# https://indrajeetpatil.github.io/preventive-r-package-care/ - -# name: lint - -on: - workflow_call: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} - cancel-in-progress: true - -jobs: - lint: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - uses: r-lib/actions/setup-r@f9a764fea8d5c63df6ef9a5c7795bf7deb5d7e05 # v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@f9a764fea8d5c63df6ef9a5c7795bf7deb5d7e05 # v2 - with: - cache-version: 2 - extra-packages: | - r-lib/lintr - local::. - needs: lint - - - name: Lint - run: | - options(crayon.enabled = TRUE) - library(lintr) - # Air takes care of all formatting - lint_package(linters = all_linters( - absolute_path_linter = NULL, - brace_linter = NULL, - commas_linter = NULL, - coalesce_linter = NULL, - commented_code_linter = NULL, - cyclocomp_linter(40L), - commas_linter = NULL, - function_left_parentheses_linter = NULL, - if_not_else_linter(exceptions = character(0L)), - indentation_linter = NULL, - infix_spaces_linter = NULL, - implicit_integer_linter = NULL, - library_call_linter = NULL, - line_length_linter = NULL, - paren_body_linter = NULL, - namespace_linter = NULL, - nonportable_path_linter = NULL, - object_length_linter(50L), - object_name_linter = NULL, - object_usage_linter = NULL, - one_call_pipe_linter = NULL, - semicolon_linter = NULL, - spaces_inside_linter = NULL, - spaces_left_parentheses_linter = NULL, - todo_comment_linter = NULL, - trailing_blank_lines_linter = NULL, - trailing_whitespace_linter = NULL, - undesirable_function_linter(c("mapply" = NA, "setwd" = NA)), - undesirable_operator_linter = NULL, - unnecessary_concatenation_linter(allow_single_expression = FALSE), - unused_import_linter = NULL, - whitespace_linter = NULL - )) - shell: Rscript {0} diff --git a/README.Rmd b/README.Rmd index c2c56e3..e181aee 100644 --- a/README.Rmd +++ b/README.Rmd @@ -87,10 +87,8 @@ name: test-coverage | check-link-rot.yaml | Checks that there are no outdated links (using `{urlchecker}`) | | check-readme.yaml | Checks that the README can be properly rendered | | check-spelling.yaml | Checks for spelling mistakes (using `{spelling}`) | -| check-styling.yaml | Checks code formatting against style guide (using `{styler}`) | | check-test-warnings.yaml | Checks for warnings in tests | | check-vignette-warnings.yaml | Checks for warnings in vignettes | -| lint.yaml | Runs `{lintr}` on the whole package to check for code quality issues | | lint-changed-files.yaml | Runs `{lintr}` on the files that were modified in a PR to check for code quality issues | | html-5-check.yaml | Checks that manual pages are valid HTML5 | | pkgdown.yaml | Runs the `{pkgdown}` workflow to check that the documentation website can be built | diff --git a/README.md b/README.md index 9eb83d5..af17d66 100644 --- a/README.md +++ b/README.md @@ -77,10 +77,8 @@ name: test-coverage | check-link-rot.yaml | Checks that there are no outdated links (using `{urlchecker}`) | | check-readme.yaml | Checks that the README can be properly rendered | | check-spelling.yaml | Checks for spelling mistakes (using `{spelling}`) | -| check-styling.yaml | Checks code formatting against style guide (using `{styler}`) | | check-test-warnings.yaml | Checks for warnings in tests | | check-vignette-warnings.yaml | Checks for warnings in vignettes | -| lint.yaml | Runs `{lintr}` on the whole package to check for code quality issues | | lint-changed-files.yaml | Runs `{lintr}` on the files that were modified in a PR to check for code quality issues | | html-5-check.yaml | Checks that manual pages are valid HTML5 | | pkgdown.yaml | Runs the `{pkgdown}` workflow to check that the documentation website can be built |