-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathpaths-allowlist.yml
More file actions
44 lines (43 loc) · 2.03 KB
/
Copy pathpaths-allowlist.yml
File metadata and controls
44 lines (43 loc) · 2.03 KB
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
# Path-hygiene gate allowlist.
# Mantra: 1 path, 1 reference.
#
# Each entry exempts a specific finding from `scripts/check-paths.mts`.
# Entries MUST carry a `reason` so the list stays audit-able and
# entries can be removed when the underlying code changes.
#
# Schema (all top-level keys optional except `reason`):
#
# - rule: Rule letter (A, B, C, D, F, G). Omit to match any rule.
# file: Substring match against the relative file path.
# pattern: Substring match against the offending snippet.
# line: Exact line number. Strict — no fuzz tolerance.
# snippet_hash: 12-char SHA-256 prefix of the normalized snippet
# (whitespace collapsed). Drift-resistant: the entry
# keeps matching after reformatting that doesn't
# change the offending construction. Get the hash by
# running `node scripts/check-paths.mts --show-hashes`.
# reason: Why this site is genuinely exempt. Required.
#
# Match policy: if `line` is provided it must match exactly. If
# `snippet_hash` is provided it must match exactly. Both may be set —
# either one matching is sufficient (so a code reformat that keeps
# the snippet but moves the line still matches via hash, and a
# reformat that changes the snippet but keeps the line still matches
# via line). If neither is set, `file` + `pattern` + `rule` matching
# is used (broader; prefer narrow entries when possible).
#
# Prefer narrow entries (rule + file + snippet_hash + pattern) over
# blanket `file:` entries that exempt the whole file. Genuine
# exemptions are rare — most "false positives" should be reported
# as gate bugs.
#
# Example:
#
# - rule: A
# file: packages/foo/scripts/legacy-build.mts
# snippet_hash: a1b2c3d4e5f6
# pattern: "path.join(testDir, 'out', 'Final')"
# reason: |
# legacy-build.mts is scheduled for removal in v2.0; refactoring
# its path construction now would conflict with the rewrite.
# (No allowlist entries yet — socket-btm is meant to be clean.)