-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added options for strict testing - add `pre-commit.yaml` - solve all lintr issues - solve all spelling issues --------- Signed-off-by: André Veríssimo <[email protected]> Signed-off-by: Pawel Rucki <[email protected]> Co-authored-by: André Veríssimo <[email protected]> Co-authored-by: Joe Zhu <[email protected]>
- Loading branch information
1 parent
2ac5374
commit d17033f
Showing
84 changed files
with
1,064 additions
and
381 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
linters: linters_with_defaults( | ||
line_length_linter = line_length_linter(120L), | ||
cyclocomp_linter = NULL, | ||
object_usage_linter = NULL, | ||
object_name_linter = object_name_linter( | ||
styles = c("snake_case", "symbols"), | ||
regexes = c( | ||
ANL = "^ANL_?[0-9A-Z_]*$", | ||
ADaM = "^r?AD[A-Z]{2,5}_?[0-9]*$", | ||
ADaM_variables = "^AVAL$|^USUBJID$|^PARAMCD$|^PARAM$" | ||
) | ||
) | ||
) |
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,62 @@ | ||
# 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.4.0 | ||
hooks: | ||
- id: style-files | ||
args: [--style_pkg=styler, --style_fun=tidyverse_style] | ||
- id: spell-check | ||
exclude: > | ||
(?x)^( | ||
.*\.[rR]| | ||
.*\.feather| | ||
.*\.jpeg| | ||
.*\.pdf| | ||
.*\.png| | ||
.*\.py| | ||
.*\.RData| | ||
.*\.rds| | ||
.*\.Rds| | ||
.*\.Rproj| | ||
.*\.scss| | ||
.*\.sh| | ||
.*\.svg| | ||
.*\.qmd| | ||
(.*/|)\.gitignore| | ||
(.*/|)\.gitlab-ci\.yml| | ||
(.*/|)\.lintr| | ||
(.*/|)\.pre-commit-.*| | ||
(.*/|)\.Rbuildignore| | ||
(.*/|)\.Renviron| | ||
(.*/|)\.Rprofile| | ||
(.*/|)CODEOWNERS| | ||
(.*/|)DESCRIPTION| | ||
(.*/|)LICENSE| | ||
(.*/|)NAMESPACE| | ||
(.*/|)staged_dependencies\.y[a]?ml| | ||
(.*/|)renv/settings\.dcf| | ||
(.*/|)renv\.lock| | ||
(.*/|)WORDLIST| | ||
\.github/workflows/.*| | ||
(.*/|)\_quarto[-]?.*\.yml| | ||
(.*/|)markdown-snaps.md| | ||
data/.* | ||
)$ | ||
- id: lintr | ||
- id: parsable-R | ||
- id: no-browser-statement | ||
- id: no-debug-statement | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-added-large-files | ||
args: ['--maxkb=200'] | ||
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,3 +105,8 @@ website: | |
language: en | ||
loading: lazy | ||
mapping: pathname | ||
|
||
profile: | ||
group: | ||
- [stable, development] | ||
default: stable |
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
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
Oops, something went wrong.