-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
61 lines (61 loc) · 2.01 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# All available hooks: https://pre-commit.com/hooks.html
repos:
- repo: local
hooks:
- id: spell-check
name: Spell check files
language: r
entry: Rscript scripts/spell-check.R
additional_dependencies:
- readr
- rprojroot
- spelling
- tidyr
- id: forbid-to-commit
name: Don't commit common R artifacts
entry: Cannot commit .Rhistory, .RData, or .Rds files.
language: fail
files: '(?i)\.(Rhistory|RData|rds)$'
# `exclude` files here are _allowed_ data files.
# Here they are specified by a full path from the repository root in a multiline regex.
exclude: |
(?x)^(
test/references/celltype/singler_models/singler_model_file.rds|
test/output/results/STUBP01/STUBS01/STUBL01_processed.rds|
test/output/results/STUBP01/STUBS16/STUBL16_processed.rds
)$
- repo: https://github.com/thlorenz/doctoc
# Update TOCs
rev: v2.2.0
hooks:
- id: doctoc
args: [--update-only, --title=**Table of Contents**]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff for linting and formatting python
rev: v0.6.9
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
- repo: https://github.com/lorenzwalthert/precommit
# R styling and linting
rev: v0.4.3.9001
hooks:
- id: style-files
args: [--style_pkg=styler, --style_fun=tidyverse_style]
# - id: lintr #skip R linting for now...
- id: parsable-R
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=200"]
- id: end-of-file-fixer
exclude: '\.Rd'
ci:
autofix_prs: true # set to false if we don't want fixes automatically applied by ci
autoupdate_branch: development
autoupdate_schedule: quarterly
# skip spell check because it can't be quickly installed on CI
skip: [spell-check]