This repository has been archived by the owner on Oct 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
80 lines (73 loc) · 3.5 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
79
80
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# Mostly copied from https://raw.githubusercontent.com/davidsneighbour/kollitsch.dev/main/.pre-commit-config.yaml
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v4.2.0
hooks:
- id: check-added-large-files #- prevents giant files from being committed
- 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.
# - 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-private-key #- detects the presence of private keys.
# - id: end-of-file-fixer #- ensures that a file is either empty, or ends with one newline.
# exclude: ^(layouts/|_vendor)
#- 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.
# - 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.8.1
hooks:
- id: typos
args: ['--config', '.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=.yamllint.yaml]
exclude: ^(.github/workflows|.pre-commit-config.yaml)
# - repo: 'https://github.com/jumanjihouse/pre-commit-hooks'
# rev: 2.1.6
# hooks:
# - id: shellcheck
# exclude: (.*\.sh\.tmpl)
# - id: shfmt
# - id: git-check
#- id: check-mailmap
#- 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]
- repo: 'https://github.com/kintoandar/pre-commit'
rev: v2.1.2
hooks:
- id: terraform_fmt
# - id: terraform_validate
- repo: 'https://github.com/zricethezav/gitleaks'
rev: v8.8.4
hooks:
- id: gitleaks
# fail_fast: true
minimum_pre_commit_version: 2.18.1