forked from pyOpenSci/python-package-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
41 lines (37 loc) · 1.46 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
# pre-commit is a tool that you run locally
# to perform a predefined set of tasks manually and/or
# automatically before git commits are made.
# Here we are using pre-commit with the precommit.ci bot to implement
# code fixes automagically in pr's. You will still want to install pre-commit
# to run locally
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
# To run on a pr, add a comment with the text "pre-commit.ci run"
# Common tasks
#
# - Run on all files: pre-commit run --all-files
# - Register git hooks: pre-commit install --install-hooks
repos:
# Misc commit checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
# ref: https://github.com/pre-commit/pre-commit-hooks#hooks-available
hooks:
# Autoformat: Makes sure files end in a newline and only a newline.
- id: end-of-file-fixer
# Lint: Check for files with names that would conflict on a
# case-insensitive filesystem like MacOS HFS+ or Windows FAT.
- id: check-case-conflict
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli
ci:
autofix_prs: false
#skip: [flake8, end-of-file-fixer]
autofix_commit_msg: |
'[pre-commit.ci 🤖] Apply code format tools to PR'
# Update hook versions every month (so we don't get hit with weekly update pr's)
autoupdate_schedule: monthly