forked from TESSEorg/ttg
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
36 lines (36 loc) · 1.44 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
# 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: v2.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: end-of-file-fixer
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.7
hooks:
- id: remove-crlf
- id: forbid-tabs
# MPQC output and JS/XML/CSS/CMake can contain tabs
exclude: \.(out|cmake|js|xml|css)$
# see https://github.com/Lucas-C/pre-commit-hooks#forbid--remove-some-unicode-characters
- repo: local
hooks:
- id: forbid-unicode-non-breaking-spaces
name: Detect unicode non-breaking space character U+00A0 aka M-BM-
language: system
entry: perl -ne 'print if $m = /\xc2\xa0/; $t ||= $m; END{{exit $t}}'
files: ''
- id: forbid-en-dashes
name: Detect the EXTREMELY confusing unicode character U+2013
language: system
entry: perl -ne 'print if $m = /\xe2\x80\x93/; $t ||= $m; END{{exit $t}}'
files: ''
- id: clang-format
name: Format C/C++ code using clang-format.
language: system
files: \.(c|cc|cxx|cpp|h|hpp|hxx|ipp)$
entry: clang-format -i
args: [ --style=file ]