forked from sigp/beacon-fuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
108 lines (96 loc) · 2.9 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# To update revisions, use `pre-commit autoupdate`
default_language_version:
python: python3
repos:
# Python
# TODO remove branch paths, should use specific revisions
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
name: python-black
- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.3
hooks:
- id: seed-isort-config
name: seed-isort-config
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21
hooks:
- id: isort
name: python-isort
additional_dependencies: [toml]
# Rust
- repo: https://github.com/doublify/pre-commit-rust
rev: 55f347186aec7f2a4ec13c31effdb4b26512f2bc
hooks:
- id: fmt
name: rust-fmt
# TODO currently doesn't work if Cargo.toml isn't in the root directory
# Can have a hook that takes in Cargo.toml files and uses manifest-path for each
# - id: cargo-check
# files: Cargo.toml
# types: [toml]
# Go
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.3.5
hooks:
# Not necessary with go-imports
#- id: go-fmt
#args: ['./...']
- id: go-imports
args: ['./...']
additional_dependencies: ['golang.org/x/tools/cmd/goimports']
# - id: go-vet
# args: ['./...']
# TODO resolve "Running error: context loading failed:"
# Would like to have some linting that doesn't require all dependencies to be installed
# - repo: https://github.com/golangci/golangci-lint
# rev: v1.21.0
# hooks:
# - id: golangci-lint
# go-vet doesn't work without building and installing dependencies
# "cannot find package ..."
# could be used for CI, but not pre-commit as it stands
# - repo: git://github.com/doublify/pre-commit-go
# rev: master
# hooks:
# - id: vet
# # TODO remove once go-vet "./..." works for dnephin hook
# name: go-vet
# args: ['./...']
# Shell
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 1.11.0
hooks:
# These need external installation
# TODO specify via additional_dependencies ?
- id: shellcheck
- id: shfmt
args: ['-l', '-i', '4', '-ci', '-w']
# C, C++ etc
- repo: https://gitlab.com/daverona-env/pre-commit-cpp
rev: 0.6.0
hooks:
- id: clang-format
- id: cpplint
args: ['--filter=-legal,-build/include_subdir,-build/c++11,-build/c++14,-runtime/int']
- id: cppcheck
# Makefile
# TODO checkmake doesn't allow usage like "checkmake f1 f2 f3" to provide
# multiple files at once
# - repo: https://github.com/Lucas-C/pre-commit-hooks-go
# rev: v1.0.0
# hooks:
# - id: checkmake
# pass_filenames: false
# files: '.*'
# types: [makefile]
# Misc/General
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: check-merge-conflict