-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
134 lines (132 loc) · 5.41 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
# 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 <jason@jasonyundt.email> (2021–2024)
# yamllint enable
%YAML 1.2
---
# Rationale: CC0-1.0.txt contains the official plain text version of CC0 [1].
# From a copyright perspective, it’s OK to modify CC0’t text [2]. The caveat is
# that CC0 contains trademarks that are owned by Creative Commons [3]. Creative
# Commons does give us a license to use those trademarks, but that license
# stipulates that you can’t use those trademarks with modified versions of
# Creative Commons legal tools. CC0 is a Creative Commons legal tool [4], so if
# we modify CC0, then we have to remove any Creative Commons trademarks from it.
#
# Excluding CC0-1.0.txt makes sure that pre-commit won’t inadvertently encourage
# someone to modify CC0’s text. In general, legal text should be handled with
# care and not automatically modified by a tool.
#
# I’m also excluding CC0-1.0.txt.spdx-meta since it would be annoying to make
# that file and CC0-1.0.txt pass the assert_contains_regex hook.
#
# yamllint disable rule:line-length
# [1]: <https://wiki.creativecommons.org/wiki/CC0_FAQ#May_I_apply_CC0_to_computer_software.3F_If_so.2C_is_there_a_recommended_implementation.3F>
# [2]: <https://github.com/creativecommons/creativecommons.org/issues/1218#issuecomment-1212525987>
# [3]: <https://creativecommons.org/policies/#trademark>
# [4]: <https://creativecommons.org/faq/#what-is-creative-commons-and-what-do-you-do>
exclude: "^CC0-1\\.0\\.txt(\\.spdx-meta)?$|^LICENSES\\/.*"
repos:
-
repo: https://gitlab.com/vojko.pribudic.foss/pre-commit-update
rev: v0.6.0post1
hooks:
-
id: pre-commit-update
args: [--dry-run]
-
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-shebang-scripts-are-executable
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
-
# Rationale: I’m going to be deploying to Unix-like systems, so
# it’s better to use Unix-style line endings.
id: mixed-line-ending
args: ["--fix=lf"]
- id: trailing-whitespace
-
repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
-
id: forbid-space-in-indent
# YAML requires spaces for indentation. See:
# <https://yaml.org/spec/1.2.2/#61-indentation-spaces>
# Pipfile.lock is automatically generated.
exclude: '.*\.yaml$|(.*/)?Pipfile\.lock$'
# This is a workaround the following issue:
# <https://github.com/jumanjihouse/pre-commit-hooks/issues/69>
types: ['text']
-
repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
-
repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
hooks:
- id: markdownlint
-
repo: https://github.com/scop/pre-commit-shfmt
rev: v3.10.0-1
hooks:
-
id: shfmt-src
args: ["-fn"]
-
repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
-
id: mypy
additional_dependencies: &usn_deps [dnspython]
-
repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
# TODO: How do I make it accept hard tabs?
# -
# repo: https://github.com/nix-community/nixpkgs-fmt
# rev: v1.2.0
# hooks:
# - id: nixpkgs-fmt
-
repo: https://pagure.io/assert_contains_regex.git
rev: 0.0.0
hooks:
-
id: assert_contains_regex
args:
- --companion-suffix
- .spdx-meta
- --pattern
- >
SPDX-FileNotice:( 🅭🄍1\.0 (Unless otherwise noted,
everything in t|T)his 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).|SPDX-License-Identifier:( LicenseRef-MIT-JY|
LicenseRef-MIT-NixOSWiki| LicenseRef-MIT-Nixpkgs|
LicenseRef-MIT-Disko)
- --pattern
- >
SPDX-FileContributor:
.+( <.+>)?
\(([0-9]{4}(-|–|, ))?[0-9]{4}\)|SPDX-FileCopyrightText:(
([0-9]{4}[-–])?[0-9]{4}
.+ <.+>)