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
//! The hooks other repositories consume, checked against what 2.0 actually is.
//!
//! `.pre-commit-hooks.yaml` is the one file in this repository whose consumer
//! is somebody else's commit gate. Nothing in the Rust suite reads it, so a
//! flag that stopped being right - or a `language` naming a package that no
//! longer exists - fails in their repository rather than ours. These assertions
//! are deliberately textual: adding a YAML parser to state four facts about a
//! 40-line file is a dependency for no gain.
/// The file with its comments stripped.
///
/// The comments explain what each setting replaced - `language: python`,
/// `--strict` - so asserting over the raw text matches the explanation of the
/// old value as if it were still in force.
/// 2.0 is a Rust binary. `language: python` builds an isolated environment
/// from the PyPI package that Phase 8 deleted, so a consumer's hook would fail
/// at install time with a pip error naming a package this repository no longer
/// publishes.
/// The markdown hook blocks on `error` severity, not on everything.
///
/// The entry was written against 1.x, where the doc checks carried no
/// severity, so `--strict` was the only way to make the hook block. Under the
/// 2.0 scale `--strict` means `--fail-on info`, and over a real repository
/// that is dominated by line length and trailing whitespace - measured at 75
/// findings on this tree, none above `info`. A consumer adopting that hook has
/// commits blocked by line length, and deletes the hook.