-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
74 lines (70 loc) · 2.8 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
62
63
64
65
66
67
68
69
70
71
72
73
74
#############################################################
# https://github.com/pre-commit/pre-commit
#############################################################
# usage: pre-commit [-h] [-V] {autoupdate,clean,gc,init-templatedir,install,install-hooks,migrate-config,run,sample-config,try-repo,uninstall,validate-config,validate-manifest,help,hook-impl} ...
#
# positional arguments:
# {autoupdate,clean,gc,init-templatedir,install,install-hooks,migrate-config,run,sample-config,try-repo,uninstall,validate-config,validate-manifest,help,hook-impl}
# autoupdate Auto-update pre-commit config to the latest repos' versions.
# clean Clean out pre-commit files.
# gc Clean unused cached repos.
# init-templatedir Install hook script in a directory intended for use with `git config init.templateDir`.
# install Install the pre-commit script.
# install-hooks Install hook environments for all environments in the config file. You may find `pre-commit install --install-hooks` more useful.
# migrate-config Migrate list configuration to new map configuration.
# run Run hooks.
# sample-config Produce a sample .pre-commit-config.yaml file
# try-repo Try the hooks in a repository, useful for developing new hooks.
# uninstall Uninstall the pre-commit script.
# validate-config Validate .pre-commit-config.yaml files
# validate-manifest Validate .pre-commit-hooks.yaml files
# help Show help for a specific command.
#############################################################
#
# Run locally:
# pre-commit run -a
#
# Install (runs every time you commit in git):
# pre-commit install
#
# Update revs in this file:
# pre-commit autoupdate
#
default_stages: [pre-commit, pre-push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
args:
- --allow-multiple-documents
- --unsafe
- id: end-of-file-fixer
- id: mixed-line-ending
args:
- --fix=auto
- id: trailing-whitespace
- id: check-json
- id: pretty-format-json
args:
- --autofix
- --no-ensure-ascii
- --no-sort-keys
- id: requirements-txt-fixer
- id: check-merge-conflict
- id: destroyed-symlinks
- id: check-symlinks
- id: check-shebang-scripts-are-executable
- repo: https://github.com/tcort/markdown-link-check
rev: v3.12.2
hooks:
- id: markdown-link-check
args: [-q]
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
hooks:
- id: shellcheck
args:
- --check-sourced
- --severity=error
- --external-sources