This repository has been archived by the owner on Apr 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
78 lines (72 loc) · 3.53 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
75
76
77
78
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v4.1.0
hooks:
# - id: check-added-large-files #- prevents giant files from being committed.
# args: ['--maxkb=1024']
- id: check-byte-order-marker #- forbids files which have a utf-8 byte-order marker.
- id: check-case-conflict #- checks for files that would conflict in case-insensitive filesystems.
- id: check-docstring-first #- checks a common error of defining a docstring after code.
- id: check-executables-have-shebangs #- ensures that (non-binary) executables have a shebang.
- id: check-json #- checks json files for parseable syntax.
exclude: ^(layouts/|.vscode/|tsconfig.json)
- id: check-shebang-scripts-are-executable #- ensures that (non-binary) files with a shebang are executable.
- id: check-merge-conflict #- checks for files that contain merge conflict strings.
- id: check-symlinks #- checks for symlinks which do not point to anything.
- id: check-toml #- checks toml files for parseable syntax.
- id: check-vcs-permalinks #- ensures that links to vcs websites are permalinks.
- id: check-xml #- checks xml files for parseable syntax.
- id: check-yaml #- checks yaml files for parseable syntax.
- id:
destroyed-symlinks #- detects symlinks which are changed to regular files with a content of a path which that symlink was pointing to.
# - id: detect-aws-credentials #- detects *your* aws credentials from the aws cli credentials file.
- id: detect-private-key #- detects the presence of private keys.
- id: double-quote-string-fixer #- replaces double quoted strings with single quoted strings.
- id: end-of-file-fixer #- ensures that a file is either empty, or ends with one newline.
- id: fix-byte-order-marker #- removes utf-8 byte order marker.
- id: forbid-new-submodules #- prevents addition of new git submodules.
- id: mixed-line-ending # replaces or checks mixed line ending.
exclude:
^(assets/plugins/|tsconfig.json)
# - id: no-commit-to-branch #- don't commit to branch
# args: [--branch, staging, --branch, master]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: "https://github.com/crate-ci/typos"
rev: v1.3.4
hooks:
- id: typos
args: ["--config", "./etc/typos.toml", "./content/"]
files: ^content|i18n
- repo: "https://github.com/PrincetonUniversity/blocklint"
rev: v0.2.3
hooks:
- id: blocklint
- repo: "https://github.com/adrienverge/yamllint"
rev: v1.26.3
hooks:
- id: yamllint
args: [-c=etc/yamllint.yaml]
- repo: "https://github.com/jumanjihouse/pre-commit-hooks"
rev: 2.1.5
hooks:
- id: check-mailmap
#- id: git-check # Configure in .gitattributes
- id: markdownlint # Configure in .mdlrc
args: ["--rules", "./etc/markdownlint-rules.rb"]
- id: script-must-have-extension
name: Shell libraries must have a .sh extension and should not be executable.
types: [shell, non-executable]
- id: script-must-not-have-extension
name: Executable shell scripts must not have an extension
types: [shell, executable]
- id: shellcheck
#- id: shfmt
- repo: "https://github.com/zricethezav/gitleaks"
rev: v8.2.5
hooks:
- id: gitleaks
# fail_fast: true
minimum_pre_commit_version: 2.18.1