Merge ~cjwatson/lazr.delegates:pre-commit into lazr.delegates:main

Proposed by Colin Watson
Status: Merged
Merged at revision: e30c5083a46cbbeb340a0f6a72d0f57218b04dd8
Proposed branch: ~cjwatson/lazr.delegates:pre-commit
Merge into: lazr.delegates:main
Diff against target: 295 lines (+256/-1)
4 files modified
.pre-commit-config.yaml (+18/-0)
.woke.yaml (+228/-0)
src/lazr/delegates/docs/conf.py (+1/-1)
tox.ini (+9/-0)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+412223@code.launchpad.net

Commit message

Add basic pre-commit configuration

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
2new file mode 100644
3index 0000000..8691251
4--- /dev/null
5+++ b/.pre-commit-config.yaml
6@@ -0,0 +1,18 @@
7+# See https://pre-commit.com for more information
8+# See https://pre-commit.com/hooks.html for more hooks
9+repos:
10+- repo: https://github.com/pre-commit/pre-commit-hooks
11+ rev: v4.0.1
12+ hooks:
13+ - id: check-added-large-files
14+ - id: check-ast
15+ - id: end-of-file-fixer
16+ - id: check-json
17+ - id: check-merge-conflict
18+ - id: check-xml
19+ - id: check-yaml
20+ - id: debug-statements
21+- repo: https://github.com/get-woke/woke
22+ rev: ee781d3ce0ddf835267764f27f4ffdd2dd21fa27
23+ hooks:
24+ - id: woke-from-source
25diff --git a/.woke.yaml b/.woke.yaml
26new file mode 100644
27index 0000000..9d704fa
28--- /dev/null
29+++ b/.woke.yaml
30@@ -0,0 +1,228 @@
31+
32+# Based on Canonical's Guidelines
33+# https://docs.google.com/document/d/1mJUa1VJHOMWa723dmKmNjSKGW-nlBv9xktzGZZwacVo/edit#heading=h.5efudb237qdb
34+rules:
35+ - name: whitelist
36+ terms:
37+ - whitelist
38+ - white-list
39+ - whitelisted
40+ - white-listed
41+ alternatives:
42+ - allowlist
43+ - inclusion list
44+ severity: warning
45+ note: "The underlying assumption of the whitelist/blacklist metaphor is that white = good and black = bad. Because colors in and of themselves have no predetermined meaning, any meaning we assign to them is cultural: for example, the color red in many Southeast Asian countries is lucky, and is often associated with events like marriages, whereas the color white carries the same connotations in many European countries. In the case of whitelist/blacklist, the terms originate in the publishing industry – one dominated by the USA and England, two countries which participated in slavery and which grapple with their racist legacies to this day."
46+
47+ - name: blacklist
48+ terms:
49+ - blacklist
50+ - black-list
51+ - blacklisted
52+ - black-listed
53+ alternatives:
54+ - denylist
55+ - blocklist
56+ - exclusion list
57+ severity: warning
58+ note: "The underlying assumption of the whitelist/blacklist metaphor is that white = good and black = bad. Because colors in and of themselves have no predetermined meaning, any meaning we assign to them is cultural: for example, the color red in many Southeast Asian countries is lucky, and is often associated with events like marriages, whereas the color white carries the same connotations in many European countries. In the case of whitelist/blacklist, the terms originate in the publishing industry – one dominated by the USA and England, two countries which participated in slavery and which grapple with their racist legacies to this day."
59+
60+ - name: master-slave
61+ terms:
62+ - master-slave
63+ - master/slave
64+ alternatives:
65+ - leader/follower
66+ - main/replica
67+ - primary/replica
68+ - primary/standby
69+ - primary/secondary
70+
71+ - name: slave
72+ terms:
73+ - slave
74+ alternatives:
75+ - follower
76+ - replica
77+ - standby
78+
79+ - name: grandfathered
80+ terms:
81+ - grandfathered
82+ alternatives:
83+ - legacy status
84+ - legacied
85+ - exempted
86+ - carried
87+ - brought forward
88+ - rolled over
89+
90+ - name: man-hours
91+ terms:
92+ - man hours
93+ - man-hours
94+ alternatives:
95+ - person hours
96+ - engineer hours
97+
98+ - name: sanity
99+ terms:
100+ - sanity
101+ alternatives:
102+ - confidence
103+ - quick check
104+ - coherence check
105+
106+ - name: dummy
107+ terms:
108+ - dummy
109+ alternatives:
110+ - placeholder
111+ - sample
112+
113+ - name: guys
114+ terms:
115+ - guys
116+ alternatives:
117+ - folks
118+ - people
119+ - you all
120+ - y'all
121+ - yinz
122+
123+ - name: whitebox
124+ terms:
125+ - white-box
126+ - whitebox
127+ - white box
128+ alternatives:
129+ - open-box
130+
131+ - name: blackbox
132+ terms:
133+ - black-box
134+ - blackbox
135+ - black box
136+ alternatives:
137+ - closed-box
138+
139+ - name: blackhat
140+ terms:
141+ - blackhat
142+ - black-hat
143+ - black hat
144+ alternatives:
145+ - attacker
146+ - malicious actor
147+
148+ - name: whitehat
149+ terms:
150+ - whitehat
151+ - white-hat
152+ - white hat
153+ alternatives:
154+ - researcher
155+ - security specialist
156+
157+ - name: illegal characters
158+ terms:
159+ - illegal characters
160+ alternatives:
161+ - invalid characters
162+ - unsupported characters
163+ - special characters
164+
165+ - name: native feature
166+ terms:
167+ - native feature
168+ alternatives:
169+ - core feature
170+ - built-in feature
171+
172+ - name: native feature
173+ terms:
174+ - native feature
175+ alternatives:
176+ - core feature
177+ - built-in feature
178+
179+ - name: chairman/foreman
180+ terms:
181+ - chairman
182+ - foreman
183+ alternatives:
184+ - chair
185+ - foreperson
186+
187+ - name: man in the middle
188+ terms:
189+ - man in the middle
190+ - man-in-the-middle
191+ alternatives:
192+ - machine-in-the-middle
193+ - person-in-the-middle
194+ - system-in-the-middle
195+ - intermediary attack
196+
197+ - name: middleman
198+ terms:
199+ - middleman
200+ alternatives:
201+ - middleperson
202+ - intermediary
203+
204+ - name: manned
205+ terms:
206+ - manned
207+ alternatives:
208+ - crewed
209+ - staffed
210+ - monitored
211+ - human operated
212+
213+ - name: mom test / girlfriend test
214+ terms:
215+ - mom test
216+ - girlfriend test
217+ alternatives:
218+ - user test
219+ - user friendly
220+
221+ - name: crazy
222+ terms:
223+ - crazy
224+ alternatives:
225+ - baffling
226+ - unexplained
227+ - errant
228+
229+ - name: cripples
230+ terms:
231+ - cripples
232+ alternatives:
233+ - slows down
234+ - hinders
235+ - obstructs
236+
237+ - name: crippling
238+ terms:
239+ - crippling
240+ alternatives:
241+ - attenuating
242+ - incapacitating
243+
244+ - name: stonith/stomith
245+ terms:
246+ - stonith
247+ - stomith
248+ alternatives:
249+ - fence failed nodes
250+ - machines
251+
252+ - name: demilitarized zone
253+ terms:
254+ - demilitarized zone
255+ - dmz
256+ alternatives:
257+ - perimeter network
258+ - passthrough network
259diff --git a/src/lazr/delegates/docs/conf.py b/src/lazr/delegates/docs/conf.py
260index e6ba426..fed69d1 100644
261--- a/src/lazr/delegates/docs/conf.py
262+++ b/src/lazr/delegates/docs/conf.py
263@@ -228,4 +228,4 @@ htmlhelp_basename = 'lazrdelegatesdoc'
264 #texinfo_domain_indices = True
265
266 # How to display URL addresses: 'footnote', 'no', or 'inline'.
267-#texinfo_show_urls = 'footnote'
268\ No newline at end of file
269+#texinfo_show_urls = 'footnote'
270diff --git a/tox.ini b/tox.ini
271index 10d788b..e8ee020 100644
272--- a/tox.ini
273+++ b/tox.ini
274@@ -1,5 +1,6 @@
275 [tox]
276 envlist =
277+ lint
278 py27
279 py35
280 py36
281@@ -17,6 +18,14 @@ deps =
282 commands =
283 coverage run -m zope.testrunner --test-path src --tests-pattern ^tests {posargs}
284
285+[testenv:lint]
286+basepython = python3.8
287+deps =
288+ pre-commit
289+skip_install = true
290+commands =
291+ pre-commit run -a
292+
293 [testenv:docs]
294 basepython =
295 python3

Subscribers

People subscribed via source and target branches

to all changes: