forked from facebookresearch/CompilerGym
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
83 lines (83 loc) · 2.42 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
---
# 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: v2.3.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
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: master
hooks:
- id: yamlfmt
- repo: https://github.com/timothycrosley/isort
rev: master
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3.8
- repo: https://github.com/kynan/nbstripout
rev: master
hooks:
- id: nbstripout
files: .ipynb
- repo: https://github.com/pocc/pre-commit-hooks
rev: python
hooks:
- id: clang-format
args: [-i]
- repo: https://github.com/nametake/pre-commit-prototool
rev: master
hooks:
- id: prototool-lint
- id: prototool-format-fix
- repo: https://github.com/FelixSeptem/pre-commit-golang
rev: master
hooks:
- id: bazel-buildifier
- repo: https://github.com/petalmd/dockerfile-pre-commit
rev: v1.0
hooks:
- id: dockerlint