-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.ncl
More file actions
138 lines (126 loc) · 4.55 KB
/
Copy pathconfig.ncl
File metadata and controls
138 lines (126 loc) · 4.55 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
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
135
136
137
138
# SPDX-License-Identifier: MPL-2.0
# SPDX-FileCopyrightText: 2025 Hyperpolymath
#
# empty-linter configuration
# Idris Inside - Uses proven library for mathematically verified operations
let Severity = [| 'Critical, 'Error, 'Warning, 'Info |] in
let LineEnding = [| 'LF, 'CRLF, 'CR |] in
let OutputFormat = [| 'text, 'json, 'hex |] in
{
# Proven library integration
proven = {
enabled = true,
modules = {
safe_hex = true, # Constant-time hex encoding
safe_path = true, # Traversal-proof paths
safe_string = true, # XSS/SQL injection prevention
safe_whitespace = true, # Text normalization (NEW module)
},
},
# Core linter configuration
linter = {
target_dir = ".",
overlay_color = "magenta",
auto_fix = false, # Conservative default - require explicit opt-in
min_severity = 'Warning,
output_format = 'text,
# Path handling (uses proven SafePath)
exclude_paths = ["node_modules", ".git", "lib", "dist", "build", ".cache"],
# Known invisible artifacts (uses proven SafeHex for detection)
artifacts = [
{ name = "NULL", hex = "0x00", severity = 'Critical, fix_action = "remove" },
{ name = "NBSP", hex = "0xA0", severity = 'Error, fix_action = "replace:20" },
{ name = "ZWSP", hex = "0x200B", severity = 'Error, fix_action = "remove" },
{ name = "BOM", hex = "0xFEFF", severity = 'Warning, fix_action = "remove" },
{ name = "SHY", hex = "0xAD", severity = 'Info, fix_action = "remove" },
{ name = "LRM", hex = "0x200E", severity = 'Info, fix_action = "remove" },
{ name = "RLM", hex = "0x200F", severity = 'Info, fix_action = "remove" },
{ name = "WJ", hex = "0x2060", severity = 'Info, fix_action = "remove" },
{ name = "ZWNJ", hex = "0x200C", severity = 'Warning, fix_action = "keep" }, # Semantic
{ name = "ZWJ", hex = "0x200D", severity = 'Warning, fix_action = "keep" }, # Semantic (emojis)
],
},
# Expanded detector controls (issue #74 — this file IS the active settings
# path; loaded and validated by src/core/Settings.bun.js)
scanner = {
extensions = null, # null: CLI default extension set
catalogue = true, # code-point catalogue (C0/DEL/C1, Unicode Cf/Zs/…)
bidi = true, # bidirectional embeddings/overrides/isolates
tags = true, # U+E0000–E007F tag characters
variation_selectors = true,
zalgo = {
enabled = true,
max_combining = 4, # ≥ this many Mn/Me marks on one base → ZALGO_RUN
},
context_radius = 12, # escaped-context window in Unicode scalars
},
# Text transformation options (uses proven SafeWhitespace)
transform = {
default = {
trim_lines = true,
trim_document = true,
collapse_spaces = true,
normalize_line_endings = true,
target_line_ending = 'LF,
max_blank_lines = 2,
remove_invisibles = true,
ensure_final_newline = true,
},
strict = {
trim_lines = true,
trim_document = true,
collapse_spaces = true,
normalize_line_endings = true,
target_line_ending = 'LF,
max_blank_lines = 1,
remove_invisibles = true,
ensure_final_newline = true,
},
minimal = {
trim_lines = false,
trim_document = false,
collapse_spaces = false,
normalize_line_endings = true,
target_line_ending = 'LF,
max_blank_lines = 100, # Effectively unlimited
remove_invisibles = true,
ensure_final_newline = false,
},
},
# Predefined workspaces with constraints
workspaces = {
twitter = {
constraints = { max_chars = 280 },
transform = "strict",
},
linkedin = {
constraints = { max_chars = 3000, max_words = 500 },
transform = "default",
},
github_issue = {
constraints = { max_chars = 65536 },
transform = "minimal",
},
jira = {
constraints = { max_chars = 32767, max_lines = 100 },
transform = "default",
},
email = {
constraints = { max_lines = 200 },
transform = "default",
},
},
# dotmatrix-fileprinter integration
dotmatrix = {
enabled = false, # Enable when dotmatrix-fileprinter is available
ipc_mode = "stdio", # "stdio" | "socket" | "http"
socket_path = "/tmp/dotmatrix.sock",
hex_dump_format = "dotmatrix", # Uses proven SafeHex
},
# Output formatting (uses proven SafeString for escaping)
output = {
html_escape = true, # XSS-proof HTML output
js_escape = true, # Injection-proof JS strings
sql_escape = false, # Only if database logging enabled
},
}