fallow 2.63.0 → 2.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +13 -12
- package/schema.json +1489 -0
- package/skills/fallow/SKILL.md +1 -1
- package/skills/fallow/references/cli-reference.md +1 -1
- package/skills/fallow/references/gotchas.md +1 -1
package/schema.json
ADDED
|
@@ -0,0 +1,1489 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "FallowConfig",
|
|
4
|
+
"description": "User-facing configuration loaded from `.fallowrc.json` or `fallow.toml`.\n\n# Examples\n\n```\nuse fallow_config::FallowConfig;\n\n// Default config has sensible defaults\nlet config = FallowConfig::default();\nassert!(config.entry.is_empty());\nassert!(!config.production);\n\n// Deserialize from JSON\nlet config: FallowConfig = serde_json::from_str(r#\"{\n \"entry\": [\"src/main.ts\"],\n \"production\": true\n}\"#).unwrap();\nassert_eq!(config.entry, vec![\"src/main.ts\"]);\nassert!(config.production);\n```",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"description": "JSON Schema reference (ignored during deserialization).",
|
|
9
|
+
"type": [
|
|
10
|
+
"string",
|
|
11
|
+
"null"
|
|
12
|
+
],
|
|
13
|
+
"writeOnly": true
|
|
14
|
+
},
|
|
15
|
+
"extends": {
|
|
16
|
+
"description": "Base config files to extend from.\n\nSupports three resolution strategies:\n- **Relative paths**: `\"./base.json\"` — resolved relative to the config file.\n- **npm packages**: `\"npm:@co/config\"` — resolved by walking up `node_modules/`.\n Package resolution checks `package.json` `exports`/`main` first, then falls back\n to standard config file names. Subpaths are supported (e.g., `npm:@co/config/strict.json`).\n- **HTTPS URLs**: `\"https://example.com/fallow-base.json\"` — fetched remotely.\n Only HTTPS is supported (no plain HTTP). URL-sourced configs may extend other\n URLs or `npm:` packages, but not relative paths. Only JSON/JSONC format is\n supported for remote configs. Timeout is configurable via\n `FALLOW_EXTENDS_TIMEOUT_SECS` (default: 5s).\n\nBase configs are loaded first, then this config's values override them.\nLater entries in the array override earlier ones.\n\n**Note:** `npm:` resolution uses `node_modules/` directory walk-up and is\nincompatible with Yarn Plug'n'Play (PnP), which has no `node_modules/`.\nURL extends fetch on every run (no caching). For reliable CI, prefer `npm:`\nfor private or critical configs.",
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"writeOnly": true
|
|
22
|
+
},
|
|
23
|
+
"entry": {
|
|
24
|
+
"description": "Additional entry point glob patterns.",
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"default": []
|
|
30
|
+
},
|
|
31
|
+
"ignorePatterns": {
|
|
32
|
+
"description": "Glob patterns to ignore from analysis.",
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"default": []
|
|
38
|
+
},
|
|
39
|
+
"framework": {
|
|
40
|
+
"description": "Custom framework definitions (inline plugin definitions).",
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": {
|
|
43
|
+
"$ref": "#/$defs/ExternalPluginDef"
|
|
44
|
+
},
|
|
45
|
+
"default": []
|
|
46
|
+
},
|
|
47
|
+
"workspaces": {
|
|
48
|
+
"description": "Workspace overrides.",
|
|
49
|
+
"anyOf": [
|
|
50
|
+
{
|
|
51
|
+
"$ref": "#/$defs/WorkspaceConfig"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "null"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"default": null
|
|
58
|
+
},
|
|
59
|
+
"ignoreDependencies": {
|
|
60
|
+
"description": "Dependencies to ignore (always considered used and always considered available).\n\nListed dependencies are excluded from both unused dependency and unlisted\ndependency detection. Useful for runtime-provided packages like `bun:sqlite`\nor implicitly available dependencies.",
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"default": []
|
|
66
|
+
},
|
|
67
|
+
"ignoreExports": {
|
|
68
|
+
"description": "Export ignore rules.",
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"$ref": "#/$defs/IgnoreExportRule"
|
|
72
|
+
},
|
|
73
|
+
"default": []
|
|
74
|
+
},
|
|
75
|
+
"ignoreExportsUsedInFile": {
|
|
76
|
+
"description": "Suppress unused-export findings when the exported symbol is referenced\ninside the file that declares it. This mirrors Knip's\n`ignoreExportsUsedInFile` option while still reporting exports that have\nno references at all.",
|
|
77
|
+
"$ref": "#/$defs/IgnoreExportsUsedInFileConfig",
|
|
78
|
+
"default": false
|
|
79
|
+
},
|
|
80
|
+
"usedClassMembers": {
|
|
81
|
+
"description": "Class member method/property rules that should never be flagged as\nunused. Supports plain member names for global suppression and scoped\nobjects with `extends` / `implements` constraints for framework-invoked\nmethods that should only be suppressed on matching classes.",
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"$ref": "#/$defs/UsedClassMemberRule"
|
|
85
|
+
},
|
|
86
|
+
"default": []
|
|
87
|
+
},
|
|
88
|
+
"duplicates": {
|
|
89
|
+
"description": "Duplication detection settings.",
|
|
90
|
+
"$ref": "#/$defs/DuplicatesConfig",
|
|
91
|
+
"default": {
|
|
92
|
+
"enabled": true,
|
|
93
|
+
"mode": "mild",
|
|
94
|
+
"minTokens": 50,
|
|
95
|
+
"minLines": 5,
|
|
96
|
+
"threshold": 0.0,
|
|
97
|
+
"ignore": [],
|
|
98
|
+
"ignoreDefaults": true,
|
|
99
|
+
"skipLocal": false,
|
|
100
|
+
"crossLanguage": false,
|
|
101
|
+
"ignoreImports": false,
|
|
102
|
+
"normalization": {},
|
|
103
|
+
"minCorpusSizeForShingleFilter": 1024,
|
|
104
|
+
"minCorpusSizeForTokenCache": 5000
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"health": {
|
|
108
|
+
"description": "Complexity health metrics settings.",
|
|
109
|
+
"$ref": "#/$defs/HealthConfig",
|
|
110
|
+
"default": {
|
|
111
|
+
"maxCyclomatic": 20,
|
|
112
|
+
"maxCognitive": 15,
|
|
113
|
+
"maxCrap": 30.0,
|
|
114
|
+
"ignore": [],
|
|
115
|
+
"ownership": {
|
|
116
|
+
"botPatterns": [
|
|
117
|
+
"*\\[bot\\]*",
|
|
118
|
+
"dependabot*",
|
|
119
|
+
"renovate*",
|
|
120
|
+
"github-actions*",
|
|
121
|
+
"svc-*",
|
|
122
|
+
"*-service-account*"
|
|
123
|
+
],
|
|
124
|
+
"emailMode": "handle"
|
|
125
|
+
},
|
|
126
|
+
"suggestInlineSuppression": true
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"rules": {
|
|
130
|
+
"description": "Per-issue-type severity rules.",
|
|
131
|
+
"$ref": "#/$defs/RulesConfig",
|
|
132
|
+
"default": {
|
|
133
|
+
"unused-files": "error",
|
|
134
|
+
"unused-exports": "error",
|
|
135
|
+
"unused-types": "error",
|
|
136
|
+
"private-type-leaks": "off",
|
|
137
|
+
"unused-dependencies": "error",
|
|
138
|
+
"unused-dev-dependencies": "warn",
|
|
139
|
+
"unused-optional-dependencies": "warn",
|
|
140
|
+
"unused-enum-members": "error",
|
|
141
|
+
"unused-class-members": "error",
|
|
142
|
+
"unresolved-imports": "error",
|
|
143
|
+
"unlisted-dependencies": "error",
|
|
144
|
+
"duplicate-exports": "error",
|
|
145
|
+
"type-only-dependencies": "warn",
|
|
146
|
+
"test-only-dependencies": "warn",
|
|
147
|
+
"circular-dependencies": "error",
|
|
148
|
+
"boundary-violation": "error",
|
|
149
|
+
"coverage-gaps": "off",
|
|
150
|
+
"feature-flags": "off",
|
|
151
|
+
"stale-suppressions": "warn"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"boundaries": {
|
|
155
|
+
"description": "Architecture boundary enforcement configuration.",
|
|
156
|
+
"$ref": "#/$defs/BoundaryConfig",
|
|
157
|
+
"default": {
|
|
158
|
+
"zones": [],
|
|
159
|
+
"rules": []
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"flags": {
|
|
163
|
+
"description": "Feature flag detection configuration.",
|
|
164
|
+
"$ref": "#/$defs/FlagsConfig",
|
|
165
|
+
"default": {
|
|
166
|
+
"configObjectHeuristics": false
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"resolve": {
|
|
170
|
+
"description": "Module resolver configuration (custom conditions, etc.).",
|
|
171
|
+
"$ref": "#/$defs/ResolveConfig",
|
|
172
|
+
"default": {}
|
|
173
|
+
},
|
|
174
|
+
"production": {
|
|
175
|
+
"description": "Production mode: exclude test/dev files, only start/build scripts.\n\nAccepts the legacy boolean form (`true` applies to all analyses) or a\nper-analysis object (`{ \"deadCode\": false, \"health\": true, \"dupes\": false }`).",
|
|
176
|
+
"$ref": "#/$defs/ProductionConfig",
|
|
177
|
+
"default": false
|
|
178
|
+
},
|
|
179
|
+
"plugins": {
|
|
180
|
+
"description": "Paths to external plugin files or directories containing plugin files.\n\nSupports TOML, JSON, and JSONC formats.\n\nIn addition to these explicit paths, fallow automatically discovers:\n- `*.toml`, `*.json`, `*.jsonc` files in `.fallow/plugins/`\n- `fallow-plugin-*.{toml,json,jsonc}` files in the project root",
|
|
181
|
+
"type": "array",
|
|
182
|
+
"items": {
|
|
183
|
+
"type": "string"
|
|
184
|
+
},
|
|
185
|
+
"default": []
|
|
186
|
+
},
|
|
187
|
+
"dynamicallyLoaded": {
|
|
188
|
+
"description": "Glob patterns for files that are dynamically loaded at runtime\n(plugin directories, locale files, etc.). These files are treated as\nalways-used and will never be flagged as unused.",
|
|
189
|
+
"type": "array",
|
|
190
|
+
"items": {
|
|
191
|
+
"type": "string"
|
|
192
|
+
},
|
|
193
|
+
"default": []
|
|
194
|
+
},
|
|
195
|
+
"overrides": {
|
|
196
|
+
"description": "Per-file rule overrides matching oxlint's overrides pattern.",
|
|
197
|
+
"type": "array",
|
|
198
|
+
"items": {
|
|
199
|
+
"$ref": "#/$defs/ConfigOverride"
|
|
200
|
+
},
|
|
201
|
+
"default": []
|
|
202
|
+
},
|
|
203
|
+
"codeowners": {
|
|
204
|
+
"description": "Path to a CODEOWNERS file for `--group-by owner`.\n\nWhen unset, fallow auto-probes `CODEOWNERS`, `.github/CODEOWNERS`,\n`.gitlab/CODEOWNERS`, and `docs/CODEOWNERS`. Set this to use a\nnon-standard location.",
|
|
205
|
+
"type": [
|
|
206
|
+
"string",
|
|
207
|
+
"null"
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"publicPackages": {
|
|
211
|
+
"description": "Workspace package name patterns that are public libraries.\nExported API surface from these packages is not flagged as unused.",
|
|
212
|
+
"type": "array",
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "string"
|
|
215
|
+
},
|
|
216
|
+
"default": []
|
|
217
|
+
},
|
|
218
|
+
"regression": {
|
|
219
|
+
"description": "Regression detection baseline embedded in config.\nStores issue counts from a known-good state for CI regression checks.\nPopulated by `--save-regression-baseline` (no path), read by `--fail-on-regression`.",
|
|
220
|
+
"anyOf": [
|
|
221
|
+
{
|
|
222
|
+
"$ref": "#/$defs/RegressionConfig"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"type": "null"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
"audit": {
|
|
230
|
+
"description": "Audit command baseline paths (one per analysis: dead-code, health, dupes).\n\n`fallow audit` runs three analyses and each has its own baseline format.\nPaths in this section are resolved relative to the project root. CLI flags\n(`--dead-code-baseline`, `--health-baseline`, `--dupes-baseline`) override\nthese values when provided.",
|
|
231
|
+
"$ref": "#/$defs/AuditConfig"
|
|
232
|
+
},
|
|
233
|
+
"sealed": {
|
|
234
|
+
"description": "Mark this config as sealed: `extends` paths must be file-relative and\nresolve within this config's own directory. `npm:` and `https:` extends\nare rejected. Useful for library publishers and monorepo sub-packages\nthat want to guarantee their config is self-contained and not subject\nto ancestor configs being injected via `extends`.\n\nDiscovery is unaffected (first-match-wins already stops the directory\nwalk at the nearest config). This only constrains `extends`.",
|
|
235
|
+
"type": "boolean",
|
|
236
|
+
"default": false
|
|
237
|
+
},
|
|
238
|
+
"includeEntryExports": {
|
|
239
|
+
"description": "Report unused exports in entry files instead of auto-marking them as\nused. Catches typos in framework exports (e.g. `meatdata` instead of\n`metadata`). The CLI flag `--include-entry-exports` (global) overrides\nthis when set; otherwise the config value is used.",
|
|
240
|
+
"type": "boolean",
|
|
241
|
+
"default": false
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"additionalProperties": false,
|
|
245
|
+
"$defs": {
|
|
246
|
+
"ExternalPluginDef": {
|
|
247
|
+
"description": "A declarative plugin definition loaded from a standalone file or inline config.\n\nExternal plugins provide the same static pattern capabilities as built-in\nplugins (entry points, always-used files, used exports, tooling dependencies),\nbut are defined in standalone files or inline in the fallow config rather than\ncompiled Rust code.\n\nThey cannot do AST-based config parsing (`resolve_config()`), but cover the\nvast majority of framework integration use cases.\n\nSupports JSONC, JSON, and TOML formats. All use camelCase field names.\n\n```json\n{\n \"$schema\": \"https://raw.githubusercontent.com/fallow-rs/fallow/main/plugin-schema.json\",\n \"name\": \"my-framework\",\n \"enablers\": [\"my-framework\", \"@my-framework/core\"],\n \"entryPoints\": [\"src/routes/**/*.{ts,tsx}\"],\n \"configPatterns\": [\"my-framework.config.{ts,js}\"],\n \"alwaysUsed\": [\"src/setup.ts\"],\n \"toolingDependencies\": [\"my-framework-cli\"],\n \"usedExports\": [\n { \"pattern\": \"src/routes/**/*.{ts,tsx}\", \"exports\": [\"default\", \"loader\", \"action\"] }\n ]\n}\n```",
|
|
248
|
+
"type": "object",
|
|
249
|
+
"properties": {
|
|
250
|
+
"name": {
|
|
251
|
+
"description": "Unique name for this plugin.",
|
|
252
|
+
"type": "string"
|
|
253
|
+
},
|
|
254
|
+
"detection": {
|
|
255
|
+
"description": "Rich detection logic (dependency checks, file existence, boolean combinators).\nTakes priority over `enablers` when set.",
|
|
256
|
+
"anyOf": [
|
|
257
|
+
{
|
|
258
|
+
"$ref": "#/$defs/PluginDetection"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"type": "null"
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"default": null
|
|
265
|
+
},
|
|
266
|
+
"enablers": {
|
|
267
|
+
"description": "Package names that activate this plugin when found in package.json.\nSupports exact matches and prefix patterns (ending with `/`).\nOnly used when `detection` is not set.",
|
|
268
|
+
"type": "array",
|
|
269
|
+
"items": {
|
|
270
|
+
"type": "string"
|
|
271
|
+
},
|
|
272
|
+
"default": []
|
|
273
|
+
},
|
|
274
|
+
"entryPoints": {
|
|
275
|
+
"description": "Glob patterns for entry point files.",
|
|
276
|
+
"type": "array",
|
|
277
|
+
"items": {
|
|
278
|
+
"type": "string"
|
|
279
|
+
},
|
|
280
|
+
"default": []
|
|
281
|
+
},
|
|
282
|
+
"entryPointRole": {
|
|
283
|
+
"description": "Coverage role for `entryPoints`.\n\nDefaults to `support`. Set to `runtime` for application entry points\nor `test` for test framework entry points.",
|
|
284
|
+
"$ref": "#/$defs/EntryPointRole",
|
|
285
|
+
"default": "support"
|
|
286
|
+
},
|
|
287
|
+
"configPatterns": {
|
|
288
|
+
"description": "Glob patterns for config files (marked as always-used when active).",
|
|
289
|
+
"type": "array",
|
|
290
|
+
"items": {
|
|
291
|
+
"type": "string"
|
|
292
|
+
},
|
|
293
|
+
"default": []
|
|
294
|
+
},
|
|
295
|
+
"alwaysUsed": {
|
|
296
|
+
"description": "Files that are always considered \"used\" when this plugin is active.",
|
|
297
|
+
"type": "array",
|
|
298
|
+
"items": {
|
|
299
|
+
"type": "string"
|
|
300
|
+
},
|
|
301
|
+
"default": []
|
|
302
|
+
},
|
|
303
|
+
"toolingDependencies": {
|
|
304
|
+
"description": "Dependencies that are tooling (used via CLI/config, not source imports).\nThese should not be flagged as unused devDependencies.",
|
|
305
|
+
"type": "array",
|
|
306
|
+
"items": {
|
|
307
|
+
"type": "string"
|
|
308
|
+
},
|
|
309
|
+
"default": []
|
|
310
|
+
},
|
|
311
|
+
"usedExports": {
|
|
312
|
+
"description": "Exports that are always considered used for matching file patterns.",
|
|
313
|
+
"type": "array",
|
|
314
|
+
"items": {
|
|
315
|
+
"$ref": "#/$defs/ExternalUsedExport"
|
|
316
|
+
},
|
|
317
|
+
"default": []
|
|
318
|
+
},
|
|
319
|
+
"usedClassMembers": {
|
|
320
|
+
"description": "Class member method/property rules the framework invokes at runtime.\nSupports plain member names for global suppression and scoped objects\nwith `extends` / `implements` constraints when the method name is too\ncommon to suppress across the whole workspace.",
|
|
321
|
+
"type": "array",
|
|
322
|
+
"items": {
|
|
323
|
+
"$ref": "#/$defs/UsedClassMemberRule"
|
|
324
|
+
},
|
|
325
|
+
"default": []
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"required": [
|
|
329
|
+
"name"
|
|
330
|
+
]
|
|
331
|
+
},
|
|
332
|
+
"PluginDetection": {
|
|
333
|
+
"description": "How to detect if a plugin should be activated.\n\nWhen set on an `ExternalPluginDef`, this takes priority over `enablers`.\nSupports dependency checks, file existence checks, and boolean combinators.",
|
|
334
|
+
"oneOf": [
|
|
335
|
+
{
|
|
336
|
+
"description": "Plugin detected if this package is in dependencies.",
|
|
337
|
+
"type": "object",
|
|
338
|
+
"properties": {
|
|
339
|
+
"package": {
|
|
340
|
+
"type": "string"
|
|
341
|
+
},
|
|
342
|
+
"type": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"const": "dependency"
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"required": [
|
|
348
|
+
"type",
|
|
349
|
+
"package"
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"description": "Plugin detected if this file pattern matches.",
|
|
354
|
+
"type": "object",
|
|
355
|
+
"properties": {
|
|
356
|
+
"pattern": {
|
|
357
|
+
"type": "string"
|
|
358
|
+
},
|
|
359
|
+
"type": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"const": "fileExists"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
"required": [
|
|
365
|
+
"type",
|
|
366
|
+
"pattern"
|
|
367
|
+
]
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"description": "All conditions must be true.",
|
|
371
|
+
"type": "object",
|
|
372
|
+
"properties": {
|
|
373
|
+
"conditions": {
|
|
374
|
+
"type": "array",
|
|
375
|
+
"items": {
|
|
376
|
+
"$ref": "#/$defs/PluginDetection"
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"type": {
|
|
380
|
+
"type": "string",
|
|
381
|
+
"const": "all"
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
"required": [
|
|
385
|
+
"type",
|
|
386
|
+
"conditions"
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"description": "Any condition must be true.",
|
|
391
|
+
"type": "object",
|
|
392
|
+
"properties": {
|
|
393
|
+
"conditions": {
|
|
394
|
+
"type": "array",
|
|
395
|
+
"items": {
|
|
396
|
+
"$ref": "#/$defs/PluginDetection"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"type": {
|
|
400
|
+
"type": "string",
|
|
401
|
+
"const": "any"
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"required": [
|
|
405
|
+
"type",
|
|
406
|
+
"conditions"
|
|
407
|
+
]
|
|
408
|
+
}
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
"EntryPointRole": {
|
|
412
|
+
"description": "How a plugin's discovered entry points contribute to coverage reachability.",
|
|
413
|
+
"oneOf": [
|
|
414
|
+
{
|
|
415
|
+
"description": "Runtime/application roots that should count toward runtime reachability.",
|
|
416
|
+
"type": "string",
|
|
417
|
+
"const": "runtime"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"description": "Test roots that should count toward test reachability.",
|
|
421
|
+
"type": "string",
|
|
422
|
+
"const": "test"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"description": "Support/setup/config roots that should keep files alive but not count as runtime/test.",
|
|
426
|
+
"type": "string",
|
|
427
|
+
"const": "support"
|
|
428
|
+
}
|
|
429
|
+
]
|
|
430
|
+
},
|
|
431
|
+
"ExternalUsedExport": {
|
|
432
|
+
"description": "Exports considered used for files matching a pattern.",
|
|
433
|
+
"type": "object",
|
|
434
|
+
"properties": {
|
|
435
|
+
"pattern": {
|
|
436
|
+
"description": "Glob pattern for files.",
|
|
437
|
+
"type": "string"
|
|
438
|
+
},
|
|
439
|
+
"exports": {
|
|
440
|
+
"description": "Export names always considered used.",
|
|
441
|
+
"type": "array",
|
|
442
|
+
"items": {
|
|
443
|
+
"type": "string"
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
"required": [
|
|
448
|
+
"pattern",
|
|
449
|
+
"exports"
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
"UsedClassMemberRule": {
|
|
453
|
+
"description": "A `usedClassMembers` entry from config or an external plugin.\n\nSupports either a plain member name or glob pattern (`\"agInit\"`,\n`\"enter*\"`) or a scoped rule that only applies when a class matches\nspecific `extends` / `implements` heritage clauses.",
|
|
454
|
+
"anyOf": [
|
|
455
|
+
{
|
|
456
|
+
"description": "Globally suppress this class member name or glob pattern for all classes.",
|
|
457
|
+
"type": "string"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"description": "Suppress these class member names only for matching classes.",
|
|
461
|
+
"$ref": "#/$defs/ScopedUsedClassMemberRule"
|
|
462
|
+
}
|
|
463
|
+
]
|
|
464
|
+
},
|
|
465
|
+
"ScopedUsedClassMemberRule": {
|
|
466
|
+
"description": "A heritage-constrained `usedClassMembers` rule.",
|
|
467
|
+
"type": "object",
|
|
468
|
+
"properties": {
|
|
469
|
+
"extends": {
|
|
470
|
+
"description": "Only apply when the class extends this parent class name.",
|
|
471
|
+
"type": [
|
|
472
|
+
"string",
|
|
473
|
+
"null"
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
"implements": {
|
|
477
|
+
"description": "Only apply when the class implements this interface name.",
|
|
478
|
+
"type": [
|
|
479
|
+
"string",
|
|
480
|
+
"null"
|
|
481
|
+
]
|
|
482
|
+
},
|
|
483
|
+
"members": {
|
|
484
|
+
"description": "Member names or glob patterns that should be treated as framework-used.",
|
|
485
|
+
"type": "array",
|
|
486
|
+
"items": {
|
|
487
|
+
"type": "string"
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
"additionalProperties": false,
|
|
492
|
+
"required": [
|
|
493
|
+
"members"
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
"WorkspaceConfig": {
|
|
497
|
+
"description": "Workspace configuration for monorepo support.",
|
|
498
|
+
"type": "object",
|
|
499
|
+
"properties": {
|
|
500
|
+
"patterns": {
|
|
501
|
+
"description": "Additional workspace patterns (beyond what's in root package.json).",
|
|
502
|
+
"type": "array",
|
|
503
|
+
"items": {
|
|
504
|
+
"type": "string"
|
|
505
|
+
},
|
|
506
|
+
"default": []
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"IgnoreExportRule": {
|
|
511
|
+
"description": "Rule for ignoring specific exports.",
|
|
512
|
+
"type": "object",
|
|
513
|
+
"properties": {
|
|
514
|
+
"file": {
|
|
515
|
+
"description": "Glob pattern for files.",
|
|
516
|
+
"type": "string"
|
|
517
|
+
},
|
|
518
|
+
"exports": {
|
|
519
|
+
"description": "Export names to ignore (`*` for all).",
|
|
520
|
+
"type": "array",
|
|
521
|
+
"items": {
|
|
522
|
+
"type": "string"
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"required": [
|
|
527
|
+
"file",
|
|
528
|
+
"exports"
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
"IgnoreExportsUsedInFileConfig": {
|
|
532
|
+
"description": "Controls whether exports referenced only inside their defining file are\nreported as unused exports.",
|
|
533
|
+
"anyOf": [
|
|
534
|
+
{
|
|
535
|
+
"description": "`true` suppresses both value and type exports that are referenced in\ntheir defining file. `false` preserves the default cross-file behavior.",
|
|
536
|
+
"type": "boolean"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"description": "Knip-compatible fine-grained form. Fallow groups type aliases and\ninterfaces under `unused_types`, so either field enables type-export\nsuppression for same-file references.",
|
|
540
|
+
"$ref": "#/$defs/IgnoreExportsUsedInFileByKind"
|
|
541
|
+
}
|
|
542
|
+
]
|
|
543
|
+
},
|
|
544
|
+
"IgnoreExportsUsedInFileByKind": {
|
|
545
|
+
"description": "Knip-compatible `ignoreExportsUsedInFile` object form.",
|
|
546
|
+
"type": "object",
|
|
547
|
+
"properties": {
|
|
548
|
+
"type": {
|
|
549
|
+
"description": "Suppress same-file references for exported type aliases.",
|
|
550
|
+
"type": "boolean",
|
|
551
|
+
"default": false
|
|
552
|
+
},
|
|
553
|
+
"interface": {
|
|
554
|
+
"description": "Suppress same-file references for exported interfaces.",
|
|
555
|
+
"type": "boolean",
|
|
556
|
+
"default": false
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
"DuplicatesConfig": {
|
|
561
|
+
"description": "Configuration for code duplication detection.",
|
|
562
|
+
"type": "object",
|
|
563
|
+
"properties": {
|
|
564
|
+
"enabled": {
|
|
565
|
+
"description": "Whether duplication detection is enabled.",
|
|
566
|
+
"type": "boolean",
|
|
567
|
+
"default": true
|
|
568
|
+
},
|
|
569
|
+
"mode": {
|
|
570
|
+
"description": "Detection mode: strict, mild, weak, or semantic.",
|
|
571
|
+
"$ref": "#/$defs/DetectionMode",
|
|
572
|
+
"default": "mild"
|
|
573
|
+
},
|
|
574
|
+
"minTokens": {
|
|
575
|
+
"description": "Minimum number of tokens for a clone.",
|
|
576
|
+
"type": "integer",
|
|
577
|
+
"format": "uint",
|
|
578
|
+
"minimum": 0,
|
|
579
|
+
"default": 50
|
|
580
|
+
},
|
|
581
|
+
"minLines": {
|
|
582
|
+
"description": "Minimum number of lines for a clone.",
|
|
583
|
+
"type": "integer",
|
|
584
|
+
"format": "uint",
|
|
585
|
+
"minimum": 0,
|
|
586
|
+
"default": 5
|
|
587
|
+
},
|
|
588
|
+
"threshold": {
|
|
589
|
+
"description": "Maximum allowed duplication percentage (0 = no limit).",
|
|
590
|
+
"type": "number",
|
|
591
|
+
"format": "double",
|
|
592
|
+
"default": 0.0
|
|
593
|
+
},
|
|
594
|
+
"ignore": {
|
|
595
|
+
"description": "Additional ignore patterns for duplication analysis.",
|
|
596
|
+
"type": "array",
|
|
597
|
+
"items": {
|
|
598
|
+
"type": "string"
|
|
599
|
+
},
|
|
600
|
+
"default": []
|
|
601
|
+
},
|
|
602
|
+
"ignoreDefaults": {
|
|
603
|
+
"description": "Merge built-in generated-framework ignore patterns with `ignore`.\n\nSet to `false` to use only the user-provided `ignore` list.",
|
|
604
|
+
"type": "boolean",
|
|
605
|
+
"default": true
|
|
606
|
+
},
|
|
607
|
+
"skipLocal": {
|
|
608
|
+
"description": "Only report cross-directory duplicates.",
|
|
609
|
+
"type": "boolean",
|
|
610
|
+
"default": false
|
|
611
|
+
},
|
|
612
|
+
"crossLanguage": {
|
|
613
|
+
"description": "Enable cross-language clone detection by stripping type annotations.\n\nWhen enabled, TypeScript type annotations (parameter types, return types,\ngenerics, interfaces, type aliases) are stripped from the token stream,\nallowing detection of clones between `.ts` and `.js` files.",
|
|
614
|
+
"type": "boolean",
|
|
615
|
+
"default": false
|
|
616
|
+
},
|
|
617
|
+
"ignoreImports": {
|
|
618
|
+
"description": "Exclude ES `import` declarations from clone detection.\n\nWhen enabled, all `import` statements (value imports, type imports, and\nside-effect imports) are stripped from the token stream before clone\ndetection. This reduces noise from sorted import blocks that naturally\nlook similar across files. Only affects ES `import` declarations;\nCommonJS `require()` calls are not filtered.",
|
|
619
|
+
"type": "boolean",
|
|
620
|
+
"default": false
|
|
621
|
+
},
|
|
622
|
+
"normalization": {
|
|
623
|
+
"description": "Fine-grained normalization overrides on top of the detection mode.",
|
|
624
|
+
"$ref": "#/$defs/NormalizationConfig",
|
|
625
|
+
"default": {}
|
|
626
|
+
},
|
|
627
|
+
"minCorpusSizeForShingleFilter": {
|
|
628
|
+
"description": "Minimum tokenized file count before focused duplicate analysis prefilters\nunchanged files with k-token shingles.",
|
|
629
|
+
"type": "integer",
|
|
630
|
+
"format": "uint",
|
|
631
|
+
"minimum": 0,
|
|
632
|
+
"default": 1024
|
|
633
|
+
},
|
|
634
|
+
"minCorpusSizeForTokenCache": {
|
|
635
|
+
"description": "Minimum source file count before the persistent duplication token cache\nactivates. Below this threshold the cache load/save overhead exceeds the\ntokenize savings, so the cache stays disabled even when not running with\n`--no-cache`.",
|
|
636
|
+
"type": "integer",
|
|
637
|
+
"format": "uint",
|
|
638
|
+
"minimum": 0,
|
|
639
|
+
"default": 5000
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
"DetectionMode": {
|
|
644
|
+
"description": "Detection mode controlling how aggressively tokens are normalized.\n\nSince fallow uses AST-based tokenization (not lexer-based), whitespace and\ncomments are inherently absent from the token stream. The `Strict` and `Mild`\nmodes are currently equivalent. `Weak` mode additionally blinds string\nliterals. `Semantic` mode blinds all identifiers and literal values for\nType-2 (renamed variable) clone detection.",
|
|
645
|
+
"oneOf": [
|
|
646
|
+
{
|
|
647
|
+
"description": "All tokens preserved including identifier names and literal values (Type-1 only).",
|
|
648
|
+
"type": "string",
|
|
649
|
+
"const": "strict"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"description": "Default mode -- equivalent to strict for AST-based tokenization.",
|
|
653
|
+
"type": "string",
|
|
654
|
+
"const": "mild"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"description": "Blind string literal values (structure-preserving).",
|
|
658
|
+
"type": "string",
|
|
659
|
+
"const": "weak"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"description": "Blind all identifiers and literal values for structural (Type-2) detection.",
|
|
663
|
+
"type": "string",
|
|
664
|
+
"const": "semantic"
|
|
665
|
+
}
|
|
666
|
+
]
|
|
667
|
+
},
|
|
668
|
+
"NormalizationConfig": {
|
|
669
|
+
"description": "Fine-grained normalization overrides.\n\nEach option, when set to `Some(true)`, forces that normalization regardless of\nthe detection mode. When set to `Some(false)`, it forces preservation. When\n`None`, the detection mode's default behavior applies.",
|
|
670
|
+
"type": "object",
|
|
671
|
+
"properties": {
|
|
672
|
+
"ignoreIdentifiers": {
|
|
673
|
+
"description": "Blind all identifiers (variable names, function names, etc.) to the same hash.\nDefault in `semantic` mode.",
|
|
674
|
+
"type": [
|
|
675
|
+
"boolean",
|
|
676
|
+
"null"
|
|
677
|
+
]
|
|
678
|
+
},
|
|
679
|
+
"ignoreStringValues": {
|
|
680
|
+
"description": "Blind string literal values to the same hash.\nDefault in `weak` and `semantic` modes.",
|
|
681
|
+
"type": [
|
|
682
|
+
"boolean",
|
|
683
|
+
"null"
|
|
684
|
+
]
|
|
685
|
+
},
|
|
686
|
+
"ignoreNumericValues": {
|
|
687
|
+
"description": "Blind numeric literal values to the same hash.\nDefault in `semantic` mode.",
|
|
688
|
+
"type": [
|
|
689
|
+
"boolean",
|
|
690
|
+
"null"
|
|
691
|
+
]
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
"HealthConfig": {
|
|
696
|
+
"description": "Configuration for complexity health metrics (`fallow health`).",
|
|
697
|
+
"type": "object",
|
|
698
|
+
"properties": {
|
|
699
|
+
"maxCyclomatic": {
|
|
700
|
+
"description": "Maximum allowed cyclomatic complexity per function (default: 20).\nFunctions exceeding this threshold are reported.",
|
|
701
|
+
"type": "integer",
|
|
702
|
+
"format": "uint16",
|
|
703
|
+
"minimum": 0,
|
|
704
|
+
"maximum": 65535,
|
|
705
|
+
"default": 20
|
|
706
|
+
},
|
|
707
|
+
"maxCognitive": {
|
|
708
|
+
"description": "Maximum allowed cognitive complexity per function (default: 15).\nFunctions exceeding this threshold are reported.",
|
|
709
|
+
"type": "integer",
|
|
710
|
+
"format": "uint16",
|
|
711
|
+
"minimum": 0,
|
|
712
|
+
"maximum": 65535,
|
|
713
|
+
"default": 15
|
|
714
|
+
},
|
|
715
|
+
"maxCrap": {
|
|
716
|
+
"description": "Maximum allowed CRAP (Change Risk Anti-Patterns) score per function\n(default: 30.0). CRAP combines cyclomatic complexity with test\ncoverage: high complexity plus low coverage produces a high CRAP\nscore. Functions meeting or exceeding this threshold are reported.\nUse `--coverage` with Istanbul data for accurate per-function CRAP;\notherwise fallow estimates coverage from the module graph.",
|
|
717
|
+
"type": "number",
|
|
718
|
+
"format": "double",
|
|
719
|
+
"default": 30.0
|
|
720
|
+
},
|
|
721
|
+
"ignore": {
|
|
722
|
+
"description": "Glob patterns to exclude from complexity analysis.",
|
|
723
|
+
"type": "array",
|
|
724
|
+
"items": {
|
|
725
|
+
"type": "string"
|
|
726
|
+
},
|
|
727
|
+
"default": []
|
|
728
|
+
},
|
|
729
|
+
"ownership": {
|
|
730
|
+
"description": "Ownership analysis configuration. Controls bot filtering and email\nprivacy mode for `--ownership` output.",
|
|
731
|
+
"$ref": "#/$defs/OwnershipConfig",
|
|
732
|
+
"default": {
|
|
733
|
+
"botPatterns": [
|
|
734
|
+
"*\\[bot\\]*",
|
|
735
|
+
"dependabot*",
|
|
736
|
+
"renovate*",
|
|
737
|
+
"github-actions*",
|
|
738
|
+
"svc-*",
|
|
739
|
+
"*-service-account*"
|
|
740
|
+
],
|
|
741
|
+
"emailMode": "handle"
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
"suggestInlineSuppression": {
|
|
745
|
+
"description": "Whether health JSON output emits `suppress-line` action hints\nalongside complexity findings (default: `true`). Set to `false` to\nopt out across the project: useful for teams that manage suppressions\nexclusively through `// fallow-ignore-*` comments authored by hand or\nthrough the `fallow.suppress` LSP code action, but who do not want\nCI-driven `suppress-line` action hints in their JSON output.\n`--baseline` activates auto-omission regardless of this setting,\nsince baseline files are a separate suppression mechanism.",
|
|
746
|
+
"type": "boolean",
|
|
747
|
+
"default": true
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
"OwnershipConfig": {
|
|
752
|
+
"description": "Configuration for ownership analysis (`fallow health --hotspots --ownership`).",
|
|
753
|
+
"type": "object",
|
|
754
|
+
"properties": {
|
|
755
|
+
"botPatterns": {
|
|
756
|
+
"description": "Glob patterns (matched against the author email local-part) that\nidentify bot or service-account commits to exclude from ownership\nsignals. Overrides the defaults entirely when set.",
|
|
757
|
+
"type": "array",
|
|
758
|
+
"items": {
|
|
759
|
+
"type": "string"
|
|
760
|
+
},
|
|
761
|
+
"default": [
|
|
762
|
+
"*\\[bot\\]*",
|
|
763
|
+
"dependabot*",
|
|
764
|
+
"renovate*",
|
|
765
|
+
"github-actions*",
|
|
766
|
+
"svc-*",
|
|
767
|
+
"*-service-account*"
|
|
768
|
+
]
|
|
769
|
+
},
|
|
770
|
+
"emailMode": {
|
|
771
|
+
"description": "Privacy mode for emitted author emails. Defaults to `handle`.\nOverride on the CLI via `--ownership-emails=raw|handle|hash`.",
|
|
772
|
+
"$ref": "#/$defs/EmailMode",
|
|
773
|
+
"default": "handle"
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
"EmailMode": {
|
|
778
|
+
"description": "Privacy mode for author emails emitted in ownership output.\n\nDefaults to `handle` (local-part only, no domain) so SARIF and JSON\nartifacts do not leak raw email addresses into CI pipelines.",
|
|
779
|
+
"oneOf": [
|
|
780
|
+
{
|
|
781
|
+
"description": "Show the raw email address as it appears in git history.\nUse for public repositories where history is already exposed.",
|
|
782
|
+
"type": "string",
|
|
783
|
+
"const": "raw"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"description": "Show the local-part only (before the `@`). Mailmap-resolved where possible.\nDefault. Balances readability and privacy.",
|
|
787
|
+
"type": "string",
|
|
788
|
+
"const": "handle"
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
"description": "Show a stable `xxh3:<16hex>` pseudonym derived from the raw email.\nNon-cryptographic; suitable to keep raw emails out of CI artifacts\n(SARIF, code-scanning uploads) but not as a security primitive --\na known list of org emails can be brute-forced into a rainbow table.\nUse in regulated environments where even local-parts are sensitive.",
|
|
792
|
+
"type": "string",
|
|
793
|
+
"const": "hash"
|
|
794
|
+
}
|
|
795
|
+
]
|
|
796
|
+
},
|
|
797
|
+
"RulesConfig": {
|
|
798
|
+
"description": "Per-issue-type severity configuration.\n\nControls which issue types cause CI failure, are reported as warnings,\nor are suppressed entirely. Most fields default to `Severity::Error`.\n\nRule names use kebab-case in config files (e.g., `\"unused-files\": \"error\"`).",
|
|
799
|
+
"type": "object",
|
|
800
|
+
"properties": {
|
|
801
|
+
"unused-files": {
|
|
802
|
+
"$ref": "#/$defs/Severity",
|
|
803
|
+
"default": "error"
|
|
804
|
+
},
|
|
805
|
+
"unused-exports": {
|
|
806
|
+
"$ref": "#/$defs/Severity",
|
|
807
|
+
"default": "error"
|
|
808
|
+
},
|
|
809
|
+
"unused-types": {
|
|
810
|
+
"$ref": "#/$defs/Severity",
|
|
811
|
+
"default": "error"
|
|
812
|
+
},
|
|
813
|
+
"private-type-leaks": {
|
|
814
|
+
"$ref": "#/$defs/Severity",
|
|
815
|
+
"default": "off"
|
|
816
|
+
},
|
|
817
|
+
"unused-dependencies": {
|
|
818
|
+
"$ref": "#/$defs/Severity",
|
|
819
|
+
"default": "error"
|
|
820
|
+
},
|
|
821
|
+
"unused-dev-dependencies": {
|
|
822
|
+
"$ref": "#/$defs/Severity",
|
|
823
|
+
"default": "warn"
|
|
824
|
+
},
|
|
825
|
+
"unused-optional-dependencies": {
|
|
826
|
+
"$ref": "#/$defs/Severity",
|
|
827
|
+
"default": "warn"
|
|
828
|
+
},
|
|
829
|
+
"unused-enum-members": {
|
|
830
|
+
"$ref": "#/$defs/Severity",
|
|
831
|
+
"default": "error"
|
|
832
|
+
},
|
|
833
|
+
"unused-class-members": {
|
|
834
|
+
"$ref": "#/$defs/Severity",
|
|
835
|
+
"default": "error"
|
|
836
|
+
},
|
|
837
|
+
"unresolved-imports": {
|
|
838
|
+
"$ref": "#/$defs/Severity",
|
|
839
|
+
"default": "error"
|
|
840
|
+
},
|
|
841
|
+
"unlisted-dependencies": {
|
|
842
|
+
"$ref": "#/$defs/Severity",
|
|
843
|
+
"default": "error"
|
|
844
|
+
},
|
|
845
|
+
"duplicate-exports": {
|
|
846
|
+
"$ref": "#/$defs/Severity",
|
|
847
|
+
"default": "error"
|
|
848
|
+
},
|
|
849
|
+
"type-only-dependencies": {
|
|
850
|
+
"$ref": "#/$defs/Severity",
|
|
851
|
+
"default": "warn"
|
|
852
|
+
},
|
|
853
|
+
"test-only-dependencies": {
|
|
854
|
+
"$ref": "#/$defs/Severity",
|
|
855
|
+
"default": "warn"
|
|
856
|
+
},
|
|
857
|
+
"circular-dependencies": {
|
|
858
|
+
"$ref": "#/$defs/Severity",
|
|
859
|
+
"default": "error"
|
|
860
|
+
},
|
|
861
|
+
"boundary-violation": {
|
|
862
|
+
"$ref": "#/$defs/Severity",
|
|
863
|
+
"default": "error"
|
|
864
|
+
},
|
|
865
|
+
"coverage-gaps": {
|
|
866
|
+
"$ref": "#/$defs/Severity",
|
|
867
|
+
"default": "error"
|
|
868
|
+
},
|
|
869
|
+
"feature-flags": {
|
|
870
|
+
"$ref": "#/$defs/Severity",
|
|
871
|
+
"default": "off"
|
|
872
|
+
},
|
|
873
|
+
"stale-suppressions": {
|
|
874
|
+
"$ref": "#/$defs/Severity",
|
|
875
|
+
"default": "warn"
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
"Severity": {
|
|
880
|
+
"description": "Severity level for rules.\n\nControls whether an issue type causes CI failure (`error`), is reported\nwithout failing (`warn`), or is suppressed entirely (`off`).",
|
|
881
|
+
"oneOf": [
|
|
882
|
+
{
|
|
883
|
+
"description": "Report and fail CI (non-zero exit code).",
|
|
884
|
+
"type": "string",
|
|
885
|
+
"const": "error"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"description": "Report but don't fail CI.",
|
|
889
|
+
"type": "string",
|
|
890
|
+
"const": "warn"
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"description": "Don't detect or report.",
|
|
894
|
+
"type": "string",
|
|
895
|
+
"const": "off"
|
|
896
|
+
}
|
|
897
|
+
]
|
|
898
|
+
},
|
|
899
|
+
"BoundaryConfig": {
|
|
900
|
+
"description": "Architecture boundary configuration.\n\nDefines zones (directory groupings) and rules (which zones may import from which).\nOptionally uses a built-in preset as a starting point.\n\n# Examples\n\n```\nuse fallow_config::BoundaryConfig;\n\nlet json = r#\"{\n \"zones\": [\n { \"name\": \"ui\", \"patterns\": [\"src/components/**\"] },\n { \"name\": \"db\", \"patterns\": [\"src/db/**\"] }\n ],\n \"rules\": [\n { \"from\": \"ui\", \"allow\": [\"db\"] }\n ]\n}\"#;\nlet config: BoundaryConfig = serde_json::from_str(json).unwrap();\nassert_eq!(config.zones.len(), 2);\nassert_eq!(config.rules.len(), 1);\n```\n\nUsing a preset:\n\n```\nuse fallow_config::BoundaryConfig;\n\nlet json = r#\"{ \"preset\": \"layered\" }\"#;\nlet mut config: BoundaryConfig = serde_json::from_str(json).unwrap();\nconfig.expand(\"src\");\nassert_eq!(config.zones.len(), 4);\nassert_eq!(config.rules.len(), 4);\n```",
|
|
901
|
+
"type": "object",
|
|
902
|
+
"properties": {
|
|
903
|
+
"preset": {
|
|
904
|
+
"description": "Built-in architecture preset. When set, expands into default zones and rules.\nUser-defined zones and rules merge on top: zones with the same name replace\nthe preset zone; rules with the same `from` replace the preset rule.\nPreset patterns use `{rootDir}/{zone}/**` where rootDir is auto-detected\nfrom tsconfig.json (falls back to `src`).\nNote: preset patterns are flat (`src/<zone>/**`). For monorepos with\nper-package source directories, define zones explicitly instead.",
|
|
905
|
+
"anyOf": [
|
|
906
|
+
{
|
|
907
|
+
"$ref": "#/$defs/BoundaryPreset"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"type": "null"
|
|
911
|
+
}
|
|
912
|
+
]
|
|
913
|
+
},
|
|
914
|
+
"zones": {
|
|
915
|
+
"description": "Named zones mapping directory patterns to architectural layers.",
|
|
916
|
+
"type": "array",
|
|
917
|
+
"items": {
|
|
918
|
+
"$ref": "#/$defs/BoundaryZone"
|
|
919
|
+
},
|
|
920
|
+
"default": []
|
|
921
|
+
},
|
|
922
|
+
"rules": {
|
|
923
|
+
"description": "Import rules between zones. A zone with a rule entry can only import\nfrom the listed zones (plus itself). A zone without a rule entry is unrestricted.",
|
|
924
|
+
"type": "array",
|
|
925
|
+
"items": {
|
|
926
|
+
"$ref": "#/$defs/BoundaryRule"
|
|
927
|
+
},
|
|
928
|
+
"default": []
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
"BoundaryPreset": {
|
|
933
|
+
"description": "Built-in architecture presets.\n\nEach preset expands into a set of zones and import rules for a common\narchitecture pattern. User-defined zones and rules merge on top of the\npreset defaults (zones with the same name replace the preset zone;\nrules with the same `from` replace the preset rule).\n\n# Examples\n\n```\nuse fallow_config::BoundaryPreset;\n\nlet preset: BoundaryPreset = serde_json::from_str(r#\"\"layered\"\"#).unwrap();\nassert!(matches!(preset, BoundaryPreset::Layered));\n```",
|
|
934
|
+
"oneOf": [
|
|
935
|
+
{
|
|
936
|
+
"description": "Classic layered architecture: presentation → application → domain ← infrastructure.\nInfrastructure may also import from application (common in DI frameworks).",
|
|
937
|
+
"type": "string",
|
|
938
|
+
"const": "layered"
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"description": "Hexagonal / ports-and-adapters: adapters → ports → domain.",
|
|
942
|
+
"type": "string",
|
|
943
|
+
"const": "hexagonal"
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
"description": "Feature-Sliced Design: app > pages > widgets > features > entities > shared.\nEach layer may only import from layers below it.",
|
|
947
|
+
"type": "string",
|
|
948
|
+
"const": "feature-sliced"
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"description": "Bulletproof React: app → features → shared + server.\nFeature modules are isolated from each other; shared utilities and server\ninfrastructure form the base layers.",
|
|
952
|
+
"type": "string",
|
|
953
|
+
"const": "bulletproof"
|
|
954
|
+
}
|
|
955
|
+
]
|
|
956
|
+
},
|
|
957
|
+
"BoundaryZone": {
|
|
958
|
+
"description": "A named zone grouping files by directory pattern.",
|
|
959
|
+
"type": "object",
|
|
960
|
+
"properties": {
|
|
961
|
+
"name": {
|
|
962
|
+
"description": "Zone identifier referenced in rules (e.g., `\"ui\"`, `\"database\"`, `\"shared\"`).",
|
|
963
|
+
"type": "string"
|
|
964
|
+
},
|
|
965
|
+
"patterns": {
|
|
966
|
+
"description": "Glob patterns (relative to project root) that define zone membership.\nA file belongs to the first zone whose pattern matches.",
|
|
967
|
+
"type": "array",
|
|
968
|
+
"items": {
|
|
969
|
+
"type": "string"
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
"root": {
|
|
973
|
+
"description": "Optional subtree scope for monorepo per-package boundaries.\n\nWhen set, the zone's `patterns` are matched against paths *relative*\nto this directory rather than the project root. At classification\ntime, fallow checks that a candidate path starts with `root` and\nstrips that prefix before glob-matching the patterns against the\nremainder. Files outside the subtree never match the zone.\n\nUseful for monorepos where each package has the same internal\ndirectory layout: instead of writing `packages/app/src/**` and\n`packages/core/src/**` (which collide on shared zone names), set\n`root: \"packages/app/\"` and `patterns: [\"src/**\"]` per package.\n\nTrailing slash and leading `./` are normalized; backslashes are\nconverted to forward slashes. Patterns must NOT redundantly include\nthe root prefix: `root: \"packages/app/\"` with\n`patterns: [\"packages/app/src/**\"]` is rejected with\n`FALLOW-BOUNDARY-ROOT-REDUNDANT-PREFIX` because patterns are\nresolved relative to the root.",
|
|
974
|
+
"type": [
|
|
975
|
+
"string",
|
|
976
|
+
"null"
|
|
977
|
+
]
|
|
978
|
+
}
|
|
979
|
+
},
|
|
980
|
+
"required": [
|
|
981
|
+
"name",
|
|
982
|
+
"patterns"
|
|
983
|
+
]
|
|
984
|
+
},
|
|
985
|
+
"BoundaryRule": {
|
|
986
|
+
"description": "An import rule between zones.",
|
|
987
|
+
"type": "object",
|
|
988
|
+
"properties": {
|
|
989
|
+
"from": {
|
|
990
|
+
"description": "The zone this rule applies to (the importing side).",
|
|
991
|
+
"type": "string"
|
|
992
|
+
},
|
|
993
|
+
"allow": {
|
|
994
|
+
"description": "Zones that `from` is allowed to import from. Self-imports are always allowed.\nAn empty list means the zone may not import from any other zone.",
|
|
995
|
+
"type": "array",
|
|
996
|
+
"items": {
|
|
997
|
+
"type": "string"
|
|
998
|
+
},
|
|
999
|
+
"default": []
|
|
1000
|
+
}
|
|
1001
|
+
},
|
|
1002
|
+
"required": [
|
|
1003
|
+
"from"
|
|
1004
|
+
]
|
|
1005
|
+
},
|
|
1006
|
+
"FlagsConfig": {
|
|
1007
|
+
"description": "Feature flag detection configuration.\n\nControls which patterns fallow uses to detect feature flags in source code.\nConfigured via the `flags` section in `.fallowrc.json` or `fallow.toml`.\n\n# Examples\n\n```json\n{\n \"flags\": {\n \"sdkPatterns\": [\n { \"function\": \"useFlag\", \"nameArg\": 0, \"provider\": \"LaunchDarkly\" }\n ],\n \"envPrefixes\": [\"FEATURE_\", \"NEXT_PUBLIC_ENABLE_\"],\n \"configObjectHeuristics\": false\n }\n}\n```",
|
|
1008
|
+
"type": "object",
|
|
1009
|
+
"properties": {
|
|
1010
|
+
"sdkPatterns": {
|
|
1011
|
+
"description": "Additional SDK call patterns to detect as feature flags.\nThese are merged with the built-in patterns (LaunchDarkly, Statsig, Unleash, GrowthBook).",
|
|
1012
|
+
"type": "array",
|
|
1013
|
+
"items": {
|
|
1014
|
+
"$ref": "#/$defs/SdkPattern"
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
"envPrefixes": {
|
|
1018
|
+
"description": "Environment variable prefixes that indicate feature flags.\nMerged with built-in prefixes. Only `process.env.*` accesses matching\nthese prefixes are reported as feature flags.",
|
|
1019
|
+
"type": "array",
|
|
1020
|
+
"items": {
|
|
1021
|
+
"type": "string"
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
"configObjectHeuristics": {
|
|
1025
|
+
"description": "Enable config object heuristic detection.\nWhen true, property accesses on objects whose name contains \"feature\",\n\"flag\", or \"toggle\" are reported as low-confidence feature flags.\nDefault: false (opt-in due to higher false positive rate).",
|
|
1026
|
+
"type": "boolean",
|
|
1027
|
+
"default": false
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
},
|
|
1031
|
+
"SdkPattern": {
|
|
1032
|
+
"description": "A custom SDK call pattern for feature flag detection.\n\nDescribes a function call that evaluates a feature flag, e.g.,\n`useFlag('new-checkout')` or `client.getFeatureValue('parser', false)`.",
|
|
1033
|
+
"type": "object",
|
|
1034
|
+
"properties": {
|
|
1035
|
+
"function": {
|
|
1036
|
+
"description": "Function name to match (e.g., `\"useFlag\"`, `\"variation\"`).",
|
|
1037
|
+
"type": "string"
|
|
1038
|
+
},
|
|
1039
|
+
"nameArg": {
|
|
1040
|
+
"description": "Zero-based index of the argument containing the flag name.",
|
|
1041
|
+
"type": "integer",
|
|
1042
|
+
"format": "uint",
|
|
1043
|
+
"minimum": 0,
|
|
1044
|
+
"default": 0
|
|
1045
|
+
},
|
|
1046
|
+
"provider": {
|
|
1047
|
+
"description": "Optional SDK/provider label shown in output (e.g., `\"LaunchDarkly\"`).",
|
|
1048
|
+
"type": [
|
|
1049
|
+
"string",
|
|
1050
|
+
"null"
|
|
1051
|
+
]
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
"required": [
|
|
1055
|
+
"function"
|
|
1056
|
+
]
|
|
1057
|
+
},
|
|
1058
|
+
"ResolveConfig": {
|
|
1059
|
+
"description": "Module resolver configuration.\n\nControls how fallow resolves import specifiers against package.json\n`exports` / `imports` fields and tsconfig paths. Configured via the\n`resolve` section in `.fallowrc.json` or `fallow.toml`.\n\n# Examples\n\n```json\n{\n \"resolve\": {\n \"conditions\": [\"development\", \"worker\"]\n }\n}\n```",
|
|
1060
|
+
"type": "object",
|
|
1061
|
+
"properties": {
|
|
1062
|
+
"conditions": {
|
|
1063
|
+
"description": "Additional export/import condition names to honor during module\nresolution. Merged with fallow's built-in conditions (`development`,\n`import`, `require`, `default`, `types`, `node`; plus `react-native`\nand `browser` when the React Native or Expo plugin is active).\n\nUser conditions are matched with higher priority than the baseline,\nso a package.json `exports` entry like:\n\n```json\n{ \"./api\": { \"worker\": \"./src/api.worker.ts\", \"import\": \"./dist/api.js\" } }\n```\n\nresolves to the `worker` branch when `\"worker\"` is listed here.\n\nSee <https://nodejs.org/api/packages.html#community-conditions-definitions>\nfor the set of community-defined conditions.",
|
|
1064
|
+
"type": "array",
|
|
1065
|
+
"items": {
|
|
1066
|
+
"type": "string"
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
"ProductionConfig": {
|
|
1072
|
+
"description": "Production-mode defaults.",
|
|
1073
|
+
"anyOf": [
|
|
1074
|
+
{
|
|
1075
|
+
"description": "Legacy/global form: `production = true` or `\"production\": true`.",
|
|
1076
|
+
"type": "boolean"
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"description": "Per-analysis form.",
|
|
1080
|
+
"$ref": "#/$defs/PerAnalysisProductionConfig"
|
|
1081
|
+
}
|
|
1082
|
+
]
|
|
1083
|
+
},
|
|
1084
|
+
"PerAnalysisProductionConfig": {
|
|
1085
|
+
"description": "Per-analysis production-mode defaults.",
|
|
1086
|
+
"type": "object",
|
|
1087
|
+
"properties": {
|
|
1088
|
+
"deadCode": {
|
|
1089
|
+
"description": "Production mode for dead-code analysis.",
|
|
1090
|
+
"type": "boolean",
|
|
1091
|
+
"default": false
|
|
1092
|
+
},
|
|
1093
|
+
"health": {
|
|
1094
|
+
"description": "Production mode for health analysis.",
|
|
1095
|
+
"type": "boolean",
|
|
1096
|
+
"default": false
|
|
1097
|
+
},
|
|
1098
|
+
"dupes": {
|
|
1099
|
+
"description": "Production mode for duplication analysis.",
|
|
1100
|
+
"type": "boolean",
|
|
1101
|
+
"default": false
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1104
|
+
"additionalProperties": false
|
|
1105
|
+
},
|
|
1106
|
+
"ConfigOverride": {
|
|
1107
|
+
"description": "Per-file override entry.",
|
|
1108
|
+
"type": "object",
|
|
1109
|
+
"properties": {
|
|
1110
|
+
"files": {
|
|
1111
|
+
"description": "Glob patterns to match files against (relative to config file location).",
|
|
1112
|
+
"type": "array",
|
|
1113
|
+
"items": {
|
|
1114
|
+
"type": "string"
|
|
1115
|
+
}
|
|
1116
|
+
},
|
|
1117
|
+
"rules": {
|
|
1118
|
+
"description": "Partial rules — only specified fields override the base rules.",
|
|
1119
|
+
"$ref": "#/$defs/PartialRulesConfig",
|
|
1120
|
+
"default": {}
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
1123
|
+
"required": [
|
|
1124
|
+
"files"
|
|
1125
|
+
]
|
|
1126
|
+
},
|
|
1127
|
+
"PartialRulesConfig": {
|
|
1128
|
+
"description": "Partial per-issue-type severity for overrides. All fields optional.",
|
|
1129
|
+
"type": "object",
|
|
1130
|
+
"properties": {
|
|
1131
|
+
"unused-files": {
|
|
1132
|
+
"anyOf": [
|
|
1133
|
+
{
|
|
1134
|
+
"$ref": "#/$defs/Severity"
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
"type": "null"
|
|
1138
|
+
}
|
|
1139
|
+
]
|
|
1140
|
+
},
|
|
1141
|
+
"unused-exports": {
|
|
1142
|
+
"anyOf": [
|
|
1143
|
+
{
|
|
1144
|
+
"$ref": "#/$defs/Severity"
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
"type": "null"
|
|
1148
|
+
}
|
|
1149
|
+
]
|
|
1150
|
+
},
|
|
1151
|
+
"unused-types": {
|
|
1152
|
+
"anyOf": [
|
|
1153
|
+
{
|
|
1154
|
+
"$ref": "#/$defs/Severity"
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
"type": "null"
|
|
1158
|
+
}
|
|
1159
|
+
]
|
|
1160
|
+
},
|
|
1161
|
+
"private-type-leaks": {
|
|
1162
|
+
"anyOf": [
|
|
1163
|
+
{
|
|
1164
|
+
"$ref": "#/$defs/Severity"
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
"type": "null"
|
|
1168
|
+
}
|
|
1169
|
+
]
|
|
1170
|
+
},
|
|
1171
|
+
"unused-dependencies": {
|
|
1172
|
+
"anyOf": [
|
|
1173
|
+
{
|
|
1174
|
+
"$ref": "#/$defs/Severity"
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
"type": "null"
|
|
1178
|
+
}
|
|
1179
|
+
]
|
|
1180
|
+
},
|
|
1181
|
+
"unused-dev-dependencies": {
|
|
1182
|
+
"anyOf": [
|
|
1183
|
+
{
|
|
1184
|
+
"$ref": "#/$defs/Severity"
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
"type": "null"
|
|
1188
|
+
}
|
|
1189
|
+
]
|
|
1190
|
+
},
|
|
1191
|
+
"unused-optional-dependencies": {
|
|
1192
|
+
"anyOf": [
|
|
1193
|
+
{
|
|
1194
|
+
"$ref": "#/$defs/Severity"
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
"type": "null"
|
|
1198
|
+
}
|
|
1199
|
+
]
|
|
1200
|
+
},
|
|
1201
|
+
"unused-enum-members": {
|
|
1202
|
+
"anyOf": [
|
|
1203
|
+
{
|
|
1204
|
+
"$ref": "#/$defs/Severity"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
"type": "null"
|
|
1208
|
+
}
|
|
1209
|
+
]
|
|
1210
|
+
},
|
|
1211
|
+
"unused-class-members": {
|
|
1212
|
+
"anyOf": [
|
|
1213
|
+
{
|
|
1214
|
+
"$ref": "#/$defs/Severity"
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"type": "null"
|
|
1218
|
+
}
|
|
1219
|
+
]
|
|
1220
|
+
},
|
|
1221
|
+
"unresolved-imports": {
|
|
1222
|
+
"anyOf": [
|
|
1223
|
+
{
|
|
1224
|
+
"$ref": "#/$defs/Severity"
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
"type": "null"
|
|
1228
|
+
}
|
|
1229
|
+
]
|
|
1230
|
+
},
|
|
1231
|
+
"unlisted-dependencies": {
|
|
1232
|
+
"anyOf": [
|
|
1233
|
+
{
|
|
1234
|
+
"$ref": "#/$defs/Severity"
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
"type": "null"
|
|
1238
|
+
}
|
|
1239
|
+
]
|
|
1240
|
+
},
|
|
1241
|
+
"duplicate-exports": {
|
|
1242
|
+
"anyOf": [
|
|
1243
|
+
{
|
|
1244
|
+
"$ref": "#/$defs/Severity"
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
"type": "null"
|
|
1248
|
+
}
|
|
1249
|
+
]
|
|
1250
|
+
},
|
|
1251
|
+
"type-only-dependencies": {
|
|
1252
|
+
"anyOf": [
|
|
1253
|
+
{
|
|
1254
|
+
"$ref": "#/$defs/Severity"
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"type": "null"
|
|
1258
|
+
}
|
|
1259
|
+
]
|
|
1260
|
+
},
|
|
1261
|
+
"test-only-dependencies": {
|
|
1262
|
+
"anyOf": [
|
|
1263
|
+
{
|
|
1264
|
+
"$ref": "#/$defs/Severity"
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
"type": "null"
|
|
1268
|
+
}
|
|
1269
|
+
]
|
|
1270
|
+
},
|
|
1271
|
+
"circular-dependencies": {
|
|
1272
|
+
"anyOf": [
|
|
1273
|
+
{
|
|
1274
|
+
"$ref": "#/$defs/Severity"
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
"type": "null"
|
|
1278
|
+
}
|
|
1279
|
+
]
|
|
1280
|
+
},
|
|
1281
|
+
"boundary-violation": {
|
|
1282
|
+
"anyOf": [
|
|
1283
|
+
{
|
|
1284
|
+
"$ref": "#/$defs/Severity"
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
"type": "null"
|
|
1288
|
+
}
|
|
1289
|
+
]
|
|
1290
|
+
},
|
|
1291
|
+
"coverage-gaps": {
|
|
1292
|
+
"anyOf": [
|
|
1293
|
+
{
|
|
1294
|
+
"$ref": "#/$defs/Severity"
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
"type": "null"
|
|
1298
|
+
}
|
|
1299
|
+
]
|
|
1300
|
+
},
|
|
1301
|
+
"feature-flags": {
|
|
1302
|
+
"anyOf": [
|
|
1303
|
+
{
|
|
1304
|
+
"$ref": "#/$defs/Severity"
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"type": "null"
|
|
1308
|
+
}
|
|
1309
|
+
]
|
|
1310
|
+
},
|
|
1311
|
+
"stale-suppressions": {
|
|
1312
|
+
"anyOf": [
|
|
1313
|
+
{
|
|
1314
|
+
"$ref": "#/$defs/Severity"
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
"type": "null"
|
|
1318
|
+
}
|
|
1319
|
+
]
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
"RegressionConfig": {
|
|
1324
|
+
"description": "Regression baseline counts, embedded in the config file.\n\nWhen `--fail-on-regression` is used without `--regression-baseline <PATH>`,\nfallow reads the baseline from this config section.\nWhen `--save-regression-baseline` is used without a path argument,\nfallow writes the baseline into the config file.",
|
|
1325
|
+
"type": "object",
|
|
1326
|
+
"properties": {
|
|
1327
|
+
"baseline": {
|
|
1328
|
+
"description": "Dead code issue counts baseline.",
|
|
1329
|
+
"anyOf": [
|
|
1330
|
+
{
|
|
1331
|
+
"$ref": "#/$defs/RegressionBaseline"
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
"type": "null"
|
|
1335
|
+
}
|
|
1336
|
+
]
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
},
|
|
1340
|
+
"RegressionBaseline": {
|
|
1341
|
+
"description": "Per-type issue counts for regression comparison.",
|
|
1342
|
+
"type": "object",
|
|
1343
|
+
"properties": {
|
|
1344
|
+
"totalIssues": {
|
|
1345
|
+
"type": "integer",
|
|
1346
|
+
"format": "uint",
|
|
1347
|
+
"minimum": 0,
|
|
1348
|
+
"default": 0
|
|
1349
|
+
},
|
|
1350
|
+
"unusedFiles": {
|
|
1351
|
+
"type": "integer",
|
|
1352
|
+
"format": "uint",
|
|
1353
|
+
"minimum": 0,
|
|
1354
|
+
"default": 0
|
|
1355
|
+
},
|
|
1356
|
+
"unusedExports": {
|
|
1357
|
+
"type": "integer",
|
|
1358
|
+
"format": "uint",
|
|
1359
|
+
"minimum": 0,
|
|
1360
|
+
"default": 0
|
|
1361
|
+
},
|
|
1362
|
+
"unusedTypes": {
|
|
1363
|
+
"type": "integer",
|
|
1364
|
+
"format": "uint",
|
|
1365
|
+
"minimum": 0,
|
|
1366
|
+
"default": 0
|
|
1367
|
+
},
|
|
1368
|
+
"unusedDependencies": {
|
|
1369
|
+
"type": "integer",
|
|
1370
|
+
"format": "uint",
|
|
1371
|
+
"minimum": 0,
|
|
1372
|
+
"default": 0
|
|
1373
|
+
},
|
|
1374
|
+
"unusedDevDependencies": {
|
|
1375
|
+
"type": "integer",
|
|
1376
|
+
"format": "uint",
|
|
1377
|
+
"minimum": 0,
|
|
1378
|
+
"default": 0
|
|
1379
|
+
},
|
|
1380
|
+
"unusedOptionalDependencies": {
|
|
1381
|
+
"type": "integer",
|
|
1382
|
+
"format": "uint",
|
|
1383
|
+
"minimum": 0,
|
|
1384
|
+
"default": 0
|
|
1385
|
+
},
|
|
1386
|
+
"unusedEnumMembers": {
|
|
1387
|
+
"type": "integer",
|
|
1388
|
+
"format": "uint",
|
|
1389
|
+
"minimum": 0,
|
|
1390
|
+
"default": 0
|
|
1391
|
+
},
|
|
1392
|
+
"unusedClassMembers": {
|
|
1393
|
+
"type": "integer",
|
|
1394
|
+
"format": "uint",
|
|
1395
|
+
"minimum": 0,
|
|
1396
|
+
"default": 0
|
|
1397
|
+
},
|
|
1398
|
+
"unresolvedImports": {
|
|
1399
|
+
"type": "integer",
|
|
1400
|
+
"format": "uint",
|
|
1401
|
+
"minimum": 0,
|
|
1402
|
+
"default": 0
|
|
1403
|
+
},
|
|
1404
|
+
"unlistedDependencies": {
|
|
1405
|
+
"type": "integer",
|
|
1406
|
+
"format": "uint",
|
|
1407
|
+
"minimum": 0,
|
|
1408
|
+
"default": 0
|
|
1409
|
+
},
|
|
1410
|
+
"duplicateExports": {
|
|
1411
|
+
"type": "integer",
|
|
1412
|
+
"format": "uint",
|
|
1413
|
+
"minimum": 0,
|
|
1414
|
+
"default": 0
|
|
1415
|
+
},
|
|
1416
|
+
"circularDependencies": {
|
|
1417
|
+
"type": "integer",
|
|
1418
|
+
"format": "uint",
|
|
1419
|
+
"minimum": 0,
|
|
1420
|
+
"default": 0
|
|
1421
|
+
},
|
|
1422
|
+
"typeOnlyDependencies": {
|
|
1423
|
+
"type": "integer",
|
|
1424
|
+
"format": "uint",
|
|
1425
|
+
"minimum": 0,
|
|
1426
|
+
"default": 0
|
|
1427
|
+
},
|
|
1428
|
+
"testOnlyDependencies": {
|
|
1429
|
+
"type": "integer",
|
|
1430
|
+
"format": "uint",
|
|
1431
|
+
"minimum": 0,
|
|
1432
|
+
"default": 0
|
|
1433
|
+
},
|
|
1434
|
+
"boundaryViolations": {
|
|
1435
|
+
"type": "integer",
|
|
1436
|
+
"format": "uint",
|
|
1437
|
+
"minimum": 0,
|
|
1438
|
+
"default": 0
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
},
|
|
1442
|
+
"AuditConfig": {
|
|
1443
|
+
"description": "Per-analysis baseline paths for the `audit` command.\n\nEach field points to a baseline file produced by the corresponding\nsubcommand (`fallow dead-code --save-baseline`, `fallow health --save-baseline`,\n`fallow dupes --save-baseline`). `audit` passes each baseline through to its\nunderlying analysis; baseline-matched issues are excluded from the verdict.",
|
|
1444
|
+
"type": "object",
|
|
1445
|
+
"properties": {
|
|
1446
|
+
"gate": {
|
|
1447
|
+
"description": "Which findings should make `fallow audit` fail.",
|
|
1448
|
+
"$ref": "#/$defs/AuditGate"
|
|
1449
|
+
},
|
|
1450
|
+
"deadCodeBaseline": {
|
|
1451
|
+
"description": "Path to the dead-code baseline (produced by `fallow dead-code --save-baseline`).",
|
|
1452
|
+
"type": [
|
|
1453
|
+
"string",
|
|
1454
|
+
"null"
|
|
1455
|
+
]
|
|
1456
|
+
},
|
|
1457
|
+
"healthBaseline": {
|
|
1458
|
+
"description": "Path to the health baseline (produced by `fallow health --save-baseline`).",
|
|
1459
|
+
"type": [
|
|
1460
|
+
"string",
|
|
1461
|
+
"null"
|
|
1462
|
+
]
|
|
1463
|
+
},
|
|
1464
|
+
"dupesBaseline": {
|
|
1465
|
+
"description": "Path to the duplication baseline (produced by `fallow dupes --save-baseline`).",
|
|
1466
|
+
"type": [
|
|
1467
|
+
"string",
|
|
1468
|
+
"null"
|
|
1469
|
+
]
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
},
|
|
1473
|
+
"AuditGate": {
|
|
1474
|
+
"description": "Gating mode for `fallow audit`.",
|
|
1475
|
+
"oneOf": [
|
|
1476
|
+
{
|
|
1477
|
+
"description": "Only findings introduced by the current changeset affect the verdict.",
|
|
1478
|
+
"type": "string",
|
|
1479
|
+
"const": "new-only"
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
"description": "All findings in changed files affect the verdict.",
|
|
1483
|
+
"type": "string",
|
|
1484
|
+
"const": "all"
|
|
1485
|
+
}
|
|
1486
|
+
]
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
}
|