generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
381 additions
and
104 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,99 +1,103 @@ | ||
# All available hooks: https://pre-commit.com/hooks.html | ||
# R specific hooks: https://github.com/lorenzwalthert/precommit | ||
repos: | ||
# R | ||
- repo: https://github.com/lorenzwalthert/precommit | ||
# R | ||
- repo: https://github.com/lorenzwalthert/precommit | ||
rev: v0.4.3 | ||
hooks: | ||
- id: style-files | ||
args: [--style_pkg=styler, --style_fun=tidyverse_style, | ||
--cache-root=styler-perm] | ||
- id: use-tidy-description | ||
- id: lintr | ||
- id: readme-rmd-rendered | ||
- id: parsable-R | ||
- id: no-browser-statement | ||
- id: no-print-statement | ||
- id: style-files | ||
args: | ||
[ | ||
--style_pkg=styler, | ||
--style_fun=tidyverse_style, | ||
--cache-root=styler-perm, | ||
] | ||
- id: use-tidy-description | ||
- id: lintr | ||
- id: readme-rmd-rendered | ||
- id: parsable-R | ||
- id: no-browser-statement | ||
- id: no-print-statement | ||
exclude: '^tests/testthat/test-print\.R$' | ||
- id: no-debug-statement | ||
- id: deps-in-desc | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
- id: no-debug-statement | ||
- id: deps-in-desc | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-added-large-files | ||
args: ['--maxkb=200'] | ||
- id: file-contents-sorter | ||
- id: check-added-large-files | ||
args: ["--maxkb=200"] | ||
exclude: "tests/testthat/data/sample_fit.RDS" | ||
- id: file-contents-sorter | ||
files: '^\.Rbuildignore$' | ||
- id: end-of-file-fixer | ||
- id: end-of-file-fixer | ||
exclude: '(\.Rd)|(tests/testthat/_snaps/)' | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: mixed-line-ending | ||
args: ['--fix=lf'] | ||
- id: trailing-whitespace | ||
exclude: 'tests/testthat/_snaps/' | ||
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] | ||
- id: trailing-whitespace | ||
exclude: "tests/testthat/_snaps/" | ||
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config | ||
rev: v1.6.1 | ||
hooks: | ||
# Only required when https://pre-commit.ci is used for config validation | ||
- id: check-pre-commit-ci-config | ||
- repo: local | ||
# Only required when https://pre-commit.ci is used for config validation | ||
- id: check-pre-commit-ci-config | ||
- repo: local | ||
hooks: | ||
- id: forbid-to-commit | ||
- 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 | ||
##### | ||
# Python | ||
- repo: https://github.com/psf/black | ||
##### | ||
# Python | ||
- repo: https://github.com/psf/black | ||
rev: 24.8.0 | ||
hooks: | ||
# if you have ipython notebooks, consider using | ||
# `black-jupyter` hook instead | ||
- id: black | ||
args: ['--line-length', '79'] | ||
- repo: https://github.com/PyCQA/isort | ||
# if you have ipython notebooks, consider using | ||
# `black-jupyter` hook instead | ||
- id: black | ||
args: ["--line-length", "79"] | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
args: ['--profile', 'black', | ||
'--line-length', '79'] | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.6.4 | ||
hooks: | ||
- id: ruff | ||
##### | ||
# Java | ||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.14.0 | ||
hooks: | ||
- id: pretty-format-java | ||
args: [--aosp,--autofix] | ||
##### | ||
# Julia | ||
# Due to lack of first-class Julia support, this needs Julia local install | ||
# and JuliaFormatter.jl installed in the library | ||
# - repo: https://github.com/domluna/JuliaFormatter.jl | ||
# rev: v1.0.39 | ||
# hooks: | ||
# - id: julia-formatter | ||
##### | ||
# Secrets | ||
- repo: https://github.com/Yelp/detect-secrets | ||
- id: isort | ||
args: ["--profile", "black", "--line-length", "79"] | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.6.4 | ||
hooks: | ||
- id: ruff | ||
##### | ||
# Java | ||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.14.0 | ||
hooks: | ||
- id: pretty-format-java | ||
args: [--aosp, --autofix] | ||
##### | ||
# Julia | ||
# Due to lack of first-class Julia support, this needs Julia local install | ||
# and JuliaFormatter.jl installed in the library | ||
# - repo: https://github.com/domluna/JuliaFormatter.jl | ||
# rev: v1.0.39 | ||
# hooks: | ||
# - id: julia-formatter | ||
##### | ||
# Secrets | ||
- repo: https://github.com/Yelp/detect-secrets | ||
rev: v1.5.0 | ||
hooks: | ||
- id: detect-secrets | ||
args: ['--baseline', '.secrets.baseline'] | ||
- id: detect-secrets | ||
args: ["--baseline", ".secrets.baseline"] | ||
exclude: package.lock.json | ||
ci: | ||
autofix_commit_msg: | | ||
[pre-commit.ci] auto fixes from pre-commit.com hooks | ||
autofix_commit_msg: | | ||
[pre-commit.ci] auto fixes from pre-commit.com hooks | ||
for more information, see https://pre-commit.ci | ||
autofix_prs: true | ||
autoupdate_branch: '' | ||
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' | ||
autoupdate_schedule: weekly | ||
submodules: false | ||
for more information, see https://pre-commit.ci | ||
autofix_prs: true | ||
autoupdate_branch: "" | ||
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate" | ||
autoupdate_schedule: weekly | ||
submodules: false |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.