-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
136 lines (115 loc) · 3.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
exclude: '(nix/sources.nix$)'
repos:
- repo: local
hooks:
#############################################
# Constitutionals
#
# Reference: https://github.com/pre-commit/pre-commit-hooks/blob/d0d9883648b4b30a43cd965471c9b5fa8f8a4131/.pre-commit-hooks.yaml
- name: Check for case conflicts
id: check-case-conflict
language: system
entry: check-case-conflict
- name: Check for merge conflicts
id: check-merge-conflict
types: [text]
language: system
entry: check-merge-conflict
- name: Check for broken symlinks
id: check-symlinks
types: [symlink]
language: system
entry: check-symlinks
- name: Check vcs permalinks
id: check-vcs-permalinks
types: [text]
language: system
entry: check-vcs-permalinks
- name: Fix End of Files
id: end-of-file-fixer
types: [text]
language: system
entry: end-of-file-fixer
- name: Trim Trailing Whitespace
id: trailing-whitespace
types: [text]
language: system
entry: trailing-whitespace-fixer
- name: Check © headers
id: headroom
always_run: true
language: system
pass_filenames: false
entry: headroom run
#############################################
# JSON
- name: Check JSON for parsability
id: check-json
types: [json]
language: system
entry: check-json
#############################################
# YAML
- name: Check YAML for parsability
id: check-yaml
types: [yaml]
language: system
entry: check-yaml
- name: Static analysis YAML with yamllint
id: yamllint
types: [yaml]
language: system
entry: yamllint
#############################################
# Nix
- name: Check Nix code style with nixpkgs-fmt
id: nixpkgs-fmt
files: '\.nix$'
language: system
entry: nixpkgs-fmt
- name: Static analysis Nix with nix-linter
id: nix-linter
files: '\.nix$'
language: system
entry: nix-linter
#############################################
# Dhall
- name: Check Dhall code style
id: dhall-format
files: '\.dhall$'
language: system
entry: ./scripts/fmap.sh "dhall format --inplace"
- name: Static analysis Dhall
id: dhall-lint
files: '\.dhall$'
language: system
entry: ./scripts/fmap.sh "dhall lint --inplace"
#############################################
# Shell
- name: Check shell code style with shfmt
id: shfmt
types: [shell]
language: system
entry: shfmt
- name: Static analysis shell scripts with shellcheck
id: shellcheck
types: [shell]
language: system
entry: shellcheck -x
#############################################
# Haskell
- name: Check Haskell code style with stylish-hasklel
id: stylish-haskell
files: '\.hs$'
language: system
entry: stylish-haskell --inplace
- name: Static analysis Haskell with hlint
id: hlint
files: '\.hs$'
language: system
entry: hlint
# - name: Static analysis Haskell with stan
# id: stan
# files: '\.hs$'
# language: system
# entry: stan