-
Notifications
You must be signed in to change notification settings - Fork 71
/
.pre-commit-config.yaml
123 lines (108 loc) · 3.77 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
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
# - id: double-quote-string-fixer
- id: check-ast
- id: check-yaml
# - id: check-json # Doesn't accept json with comments
# - id: requirements-txt-fixer # Can't handle comments
- repo: local
hooks:
- id: markdown-conventions
name: Markdown conventions
entry: scripts/markdown_conventions.py
language: python
always_run: true
files: ^src\/.+\.md$
types_or: [markdown, text]
- id: blank-line-conventions
# Depends on `markdown-conventions`
name: Blank line conventions in literate Agda Markdown files
entry: scripts/blank_line_conventions.py
language: python
always_run: true
files: ^src\/.+\.lagda\.md$
types_or: [markdown, text]
- id: fix-imports
name: Format imports of Agda files
entry: scripts/fix_imports.py
language: python
always_run: true
files: ^src\/.+\.lagda\.md$
types_or: [markdown, text]
- id: spaces-conventions-simple
name: Simple space conventions in Agda blocks
entry: scripts/spaces_conventions_simple.py
language: python
always_run: true
files: ^src\/.+\.lagda\.md$
types_or: [markdown, text]
- id: even-indentation-conventions
name: Even indentation conventions in Agda blocks
entry: scripts/even_indentation_conventions.py
language: python
always_run: true
files: ^src\/.+\.lagda\.md$
types_or: [markdown, text]
require_serial: true
- id: wrap-long-lines-simple
name: Wrap simple to fix long lines of Agda code
entry: scripts/wrap_long_lines_simple.py
language: python
always_run: true
files: ^src\/.+\.lagda\.md$
types_or: [markdown, text]
- id: max-line-length-conventions
# Should run after `wrap-long-lines-simple`
name: Check the maximum line length conventions
entry: scripts/max_line_length_conventions.py
language: python
files: ^src\/[^/]+\/.+\.lagda\.md$ # Don't match top level modules
types_or: [markdown, text]
require_serial: true
- id: generate-namespace-index-modules
name: Generate Agda namespace index modules
entry: scripts/generate_namespace_index_modules.py
language: python
always_run: true
pass_filenames: false
require_serial: true
- id: generate-main-index-file
name: Generate main index file
entry: scripts/generate_main_index_file.py
language: python
always_run: true
pass_filenames: false
require_serial: true
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
# - repo: https://github.com/pre-commit/mirrors-autopep8
# rev: 'v2.0.2'
# hooks:
# - id: autopep8
# name: Python scripts formatting
# args: ['-i', '--global-config', '/dev/null']
- repo: https://github.com/pre-commit/mirrors-prettier
rev: 'v3.0.0-alpha.6'
hooks:
- id: prettier
name: CSS, JS, YAML and Markdown (no codeblocks) formatting
types_or: [css, javascript, yaml, markdown]
# Experimental hooks
# - id: spaces-convention
# name: Check Agda code block spaces convention
# entry: scripts/spaces_convention.py
# language: python
# always_run: true
# verbose: true
# files: ^src\/.+\.lagda\.md$
# types_or: [markdown, text]
# require_serial: false