-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds and runs extended pre-commit (#7)
- Loading branch information
1 parent
e9f9533
commit ea74812
Showing
23 changed files
with
121 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
^chef\.Rproj$ | ||
^\.Rproj\.user$ | ||
^LICENSE\.md$ | ||
^\.Rproj\.user$ | ||
^\.github$ | ||
^\.pre-commit-config\.yaml$ | ||
^_pkgdown\.yml$ | ||
^chef\.Rproj$ | ||
^docs$ | ||
^pkgdown$ | ||
^\.github$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ for branch in "${protected_branches[@]}"; do | |
done | ||
|
||
|
||
exit 0 | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,4 +45,3 @@ jobs: | |
# uses: ./.github/workflows/Roxygen.yaml | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,4 +47,4 @@ jobs: | |
|
||
- uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
upload-snapshots: true | ||
upload-snapshots: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# All available hooks: https://pre-commit.com/hooks.html | ||
# R specific hooks: https://github.com/lorenzwalthert/precommit | ||
repos: | ||
- repo: https://github.com/lorenzwalthert/precommit | ||
rev: v0.3.2.9027 | ||
hooks: | ||
# - id: style-files | ||
# args: [--style_pkg=styler, --style_fun=tidyverse_style] | ||
# - id: roxygenize | ||
# codemeta must be above use-tidy-description when both are used | ||
# - id: codemeta-description-updated | ||
# - id: use-tidy-description | ||
# - id: spell-check | ||
# exclude: > | ||
# (?x)^( | ||
# .*\.[rR]| | ||
# .*\.feather| | ||
# .*\.jpeg| | ||
# .*\.pdf| | ||
# .*\.png| | ||
# .*\.py| | ||
# .*\.RData| | ||
# .*\.rds| | ||
# .*\.Rds| | ||
# .*\.Rproj| | ||
# .*\.sh| | ||
# (.*/|)\.gitignore| | ||
# (.*/|)\.gitlab-ci\.yml| | ||
# (.*/|)\.lintr| | ||
# (.*/|)\.pre-commit-.*| | ||
# (.*/|)\.Rbuildignore| | ||
# (.*/|)\.Renviron| | ||
# (.*/|)\.Rprofile| | ||
# (.*/|)\.travis\.yml| | ||
# (.*/|)appveyor\.yml| | ||
# (.*/|)NAMESPACE| | ||
# (.*/|)renv/settings\.dcf| | ||
# (.*/|)renv\.lock| | ||
# (.*/|)WORDLIST| | ||
# \.github/workflows/.*| | ||
# data/.*| | ||
# )$ | ||
# - id: lintr | ||
- id: readme-rmd-rendered | ||
- id: parsable-R | ||
- id: no-browser-statement | ||
- id: no-print-statement | ||
- id: no-debug-statement | ||
exclude: "R/try_and_validate.R" | ||
- id: deps-in-desc | ||
args: [--allow_private_imports] | ||
exclude: "tests/testthat/test-fetch_db_data.R" | ||
- id: pkgdown | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v1.2.3 | ||
hooks: | ||
- id: no-commit-to-branch | ||
args: [--branch, staging, --branch, main, --branch, dev] | ||
- id: check-added-large-files | ||
args: ['--maxkb=200'] | ||
# - id: file-contents-sorter | ||
# files: '^\.Rbuildignore$' | ||
- id: end-of-file-fixer | ||
exclude: > | ||
'\.Rd' | ||
'tests/testthat/_snaps' | ||
- id: detect-private-key | ||
# - id: detect-aws-credentials | ||
- repo: local | ||
hooks: | ||
- id: forbid-to-commit | ||
name: Don't commit common R artifacts | ||
entry: Cannot commit .Rhistory, .RData, .Rds or .rds. | ||
language: fail | ||
files: '\.(Rhistory|RData|Rds|rds)$' | ||
# `exclude: <regex>` to allow committing specific files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,5 +103,3 @@ apply_stats <- | |
ep_cp[, .SD, .SDcols = keep] | ||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,3 @@ generate_function_table_row <- function(fn_type, fn, fn_name, fn_hash, env){ | |
|
||
return(out_row) | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,4 +150,3 @@ error_not_fn <- function(x, i) { | |
) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,4 +52,3 @@ expect_same_items <- function(actual, expected, ...) { | |
} | ||
invisible(actual) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -464,5 +464,3 @@ test_that("base - dataprep", { | |
regexp = "'arg' should be one of" | ||
) | ||
}) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -385,8 +385,3 @@ endpoint_XYZ <- mk_endpoint_str( | |
) | ||
``` | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -543,26 +543,3 @@ mk_endpoint_def <- function() { | |
) | ||
} | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|