-
Notifications
You must be signed in to change notification settings - Fork 129
/
.pre-commit-config.yaml
88 lines (88 loc) · 2.61 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
81
82
83
84
85
86
87
88
---
# Run the project code formatters.
#
# Installation
# ------------
#
# The pre-commit hooks rely on third party linters being in your $PATH.
# On macOS, install these using:
#
# $ brew install pre-commit buildifier llvm prototool python hadolint
# $ python -m pip install -r requirements_pre_commit.txt
#
# On linux:
#
# $ sudo apt install golang clang-format
# $ go get github.com/bazelbuild/buildtools/buildifier
# $ GO111MODULE=on go get github.com/uber/prototool/cmd/prototool@dev
# $ wget -O hadolint https://github.com/hadolint/hadolint/releases/download/v1.19.0/hadolint-Linux-x86_64 && chmod +x hadolint && sudo mv hadolint /usr/local/bin/hadolint
# $ python -m pip install -r requirements.pre_commit.txt
#
# Usage
# -----
#
# Run the pre-commit hooks on all files using:
#
# $ pre-commit run --all-files
#
# Install the pre-commit hook using:
#
# $ pre-commit install
#
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
args: [--maxkb=10000]
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: end-of-file-fixer
- id: pretty-format-json
args: [--autofix, --indent=2, --no-sort-keys]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.1.0
hooks:
- id: yamlfmt
- repo: https://github.com/timothycrosley/isort
rev: 5.7.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language_version: python3.8
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
- repo: https://github.com/kynan/nbstripout
rev: 0.3.9
hooks:
- id: nbstripout
files: .ipynb
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.1.1
hooks:
- id: clang-format
args: [-i]
- repo: https://github.com/nametake/pre-commit-prototool
rev: v0.1.0
hooks:
- id: prototool-lint
- id: prototool-format-fix
- repo: https://github.com/FelixSeptem/pre-commit-golang
rev: 12f5442f51377b10b26651ad745206bbe1500ad6
hooks:
- id: bazel-buildifier
- repo: https://github.com/petalmd/dockerfile-pre-commit
rev: v1.0
hooks:
- id: dockerlint