-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
132 lines (130 loc) · 5.04 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
# yamllint disable rule:line-length
# SPDX-FileNotice: 🅭🄍1.0 This file is dedicated to the public domain using the CC0 1.0 Universal Public Domain Dedication <https://creativecommons.org/publicdomain/zero/1.0/>.
# SPDX-FileContributor: Jason Yundt <[email protected]> (2021–2022)
# yamllint enable
%YAML 1.2
---
repos:
-
repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
hooks:
- id: yamllint
-
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-yaml
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
-
repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.5
hooks:
-
id: forbid-space-in-indent
# YAML requires spaces for indentation. See:
# <https://yaml.org/spec/1.2.2/#61-indentation-spaces>
exclude: '.*\.yaml$'
# This is a workaround the following issue:
# <https://github.com/jumanjihouse/pre-commit-hooks/issues/69>
types: ['text']
-
repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.30.0
hooks:
- id: markdownlint
-
repo: https://github.com/lovesegfault/beautysh
rev: v6.2.1
hooks:
-
id: beautysh
args: ['--tab', '--force-function-style', 'fnonly']
-
repo: https://github.com/PyCQA/autoflake
rev: v1.4
hooks:
- id: autoflake
-
repo: local
hooks:
-
id: build
name: Build Jason’s Web Site
entry: pipenv run python -m build_tool
args:
- --minify
- --double-validate
- --scheme
- file
- --scheme
- ftp
- --scheme
- http
- --scheme
- https
language: system
files: '(templates|static)/.*|^build_tool/.*|^Pipfile$'
pass_filenames: false
# While it’s true that this hook souldn’t be run in parallel,
# it seems unlikely that it ever would be. In other words, I’m
# not sure that setting require_serial does anything here.
require_serial: true
description: Fails if the site doesn’t validate.
-
repo: https://pagure.io/assert_contains_regex.git
rev: 0.0.0
hooks:
-
id: assert_contains_regex
name: "assert_contains_regex (everything but CC symbols CSS)"
exclude: &cc_css
'^src/jasons-web-site/static/cc-symbols-font\.css$'
args:
- --companion-suffix
- .spdx-meta
- --pattern
- >
SPDX-FileNotice:( 🅭🄍1\.0 This file is dedicated to the
public domain using the CC0 1\.0 Universal Public
Domain Dedication
<https://creativecommons.org/publicdomain/zero/1\.0/>|
The author of this font waived all copyright to the
font and released it into the 🅮 public domain|
I believe that my use of this file is fair use, but you
might disagree. If you do disagree, send me an email and
I’ll be more than happy to take it down|
Please extract this archive for additional copying
information)\.
- --pattern
- >
SPDX-FileContributor:
.+( <.+>)?
\(([0-9]{4}[-–])?[0-9]{4}\)
-
# yamllint disable rule:line-length
#
# This file gets special treatment. Here’s why:
# <https://comment.ctrl.blog/discussion/creative-commons-unicode-fallback-font>
#
# yamllint enable
id: assert_contains_regex
name: "assert_contains_regex (CC symbols CSS)"
files: *cc_css
args:
- --companion-suffix
- .spdx-meta
- --pattern
- "SPDX-License-Identifier: CC0-1.0\n"
- --pattern
- "SPDX-FileContributor: .+ <.+> \\((202[12][-–])?2022\\)\n"