@nielspeter/eess-ts 0.7.0 → 0.9.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/dist/builders/cross-layer-builder.d.ts.map +1 -1
- package/dist/builders/cross-layer-builder.js +6 -8
- package/dist/builders/cross-layer-builder.js.map +1 -1
- package/dist/builders/slice-rule-builder.d.ts.map +1 -1
- package/dist/builders/slice-rule-builder.js +7 -1
- package/dist/builders/slice-rule-builder.js.map +1 -1
- package/dist/conditions/dependency.d.ts.map +1 -1
- package/dist/conditions/dependency.js +5 -6
- package/dist/conditions/dependency.js.map +1 -1
- package/dist/conditions/function.d.ts.map +1 -1
- package/dist/conditions/function.js +22 -8
- package/dist/conditions/function.js.map +1 -1
- package/dist/conditions/reverse-dependency.d.ts.map +1 -1
- package/dist/conditions/reverse-dependency.js +16 -14
- package/dist/conditions/reverse-dependency.js.map +1 -1
- package/dist/conditions/structural.d.ts.map +1 -1
- package/dist/conditions/structural.js +28 -11
- package/dist/conditions/structural.js.map +1 -1
- package/dist/core/disk-set.d.ts.map +1 -1
- package/dist/core/disk-set.js +37 -2
- package/dist/core/disk-set.js.map +1 -1
- package/dist/core/glob-evaluator.d.ts.map +1 -1
- package/dist/core/glob-evaluator.js +5 -1
- package/dist/core/glob-evaluator.js.map +1 -1
- package/dist/core/import-candidates.d.ts +43 -0
- package/dist/core/import-candidates.d.ts.map +1 -1
- package/dist/core/import-candidates.js +46 -0
- package/dist/core/import-candidates.js.map +1 -1
- package/dist/core/path-universe.d.ts.map +1 -1
- package/dist/core/path-universe.js +10 -0
- package/dist/core/path-universe.js.map +1 -1
- package/dist/core/project-relative.d.ts +165 -42
- package/dist/core/project-relative.d.ts.map +1 -1
- package/dist/core/project-relative.js +355 -2
- package/dist/core/project-relative.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models/slice.d.ts.map +1 -1
- package/dist/models/slice.js +20 -16
- package/dist/models/slice.js.map +1 -1
- package/dist/predicates/identity.d.ts +4 -1
- package/dist/predicates/identity.d.ts.map +1 -1
- package/dist/predicates/identity.js +39 -38
- package/dist/predicates/identity.js.map +1 -1
- package/dist/predicates/module.d.ts.map +1 -1
- package/dist/predicates/module.js +3 -4
- package/dist/predicates/module.js.map +1 -1
- package/dist/presets/agent-guardrails.d.ts.map +1 -1
- package/dist/presets/agent-guardrails.js +65 -14
- package/dist/presets/agent-guardrails.js.map +1 -1
- package/dist/presets/boundaries.js +58 -16
- package/dist/presets/boundaries.js.map +1 -1
- package/dist/presets/recommended.d.ts +21 -6
- package/dist/presets/recommended.d.ts.map +1 -1
- package/dist/presets/recommended.js.map +1 -1
- package/dist/rules/errors.d.ts +17 -0
- package/dist/rules/errors.d.ts.map +1 -1
- package/dist/rules/errors.js +21 -0
- package/dist/rules/errors.js.map +1 -1
- package/dist/smells/duplicate-bodies.d.ts +1 -1
- package/dist/smells/duplicate-bodies.d.ts.map +1 -1
- package/dist/smells/duplicate-bodies.js +12 -11
- package/dist/smells/duplicate-bodies.js.map +1 -1
- package/dist/smells/sibling-files.d.ts.map +1 -1
- package/dist/smells/sibling-files.js +16 -7
- package/dist/smells/sibling-files.js.map +1 -1
- package/dist/smells/smell-builder.d.ts.map +1 -1
- package/dist/smells/smell-builder.js +15 -1
- package/dist/smells/smell-builder.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import picomatch from 'picomatch';
|
|
2
1
|
import { globNode } from '@nielspeter/eess';
|
|
3
|
-
import { isProjectRelative,
|
|
2
|
+
import { isProjectRelative, matchesPath, pathGlobMatcher } from '../core/project-relative.js';
|
|
4
3
|
// --- Name predicates ---
|
|
5
4
|
/**
|
|
6
5
|
* Matches elements whose name matches the given pattern.
|
|
@@ -44,30 +43,41 @@ export function haveNameEndingWith(suffix) {
|
|
|
44
43
|
// --- File & Folder predicates ---
|
|
45
44
|
/**
|
|
46
45
|
* Matches elements that reside in a file matching the given glob.
|
|
47
|
-
* The glob is matched against the absolute file path
|
|
46
|
+
* The glob is matched against the absolute file path, the path named from the
|
|
47
|
+
* project root (bug 0339) and — for a `'**\/'`-led glob only — the path named from
|
|
48
|
+
* the repository root (bug 0348). See `core/project-relative.ts`, which owns which
|
|
49
|
+
* spelling gets which.
|
|
48
50
|
*
|
|
49
51
|
* @example
|
|
50
52
|
* resideInFile('** /routes.ts') // matches /abs/path/src/routes.ts
|
|
51
53
|
* resideInFile('** /src/*.ts') // matches any .ts file directly in src/
|
|
52
54
|
*/
|
|
53
55
|
export function resideInFile(glob) {
|
|
54
|
-
const
|
|
55
|
-
const relative = isProjectRelative(glob);
|
|
56
|
+
const matcher = pathGlobMatcher(glob);
|
|
56
57
|
return {
|
|
57
58
|
// `base: 'normalized'` when the glob is project-relative — the anchor check
|
|
58
59
|
// in `syntacticFault` calls an unanchored glob dead against absolute paths,
|
|
59
60
|
// and it stops being dead exactly when it starts working (plan 0067 C).
|
|
60
|
-
|
|
61
|
+
//
|
|
62
|
+
// Deliberately NOT `readsRootRelativePath`, which is the wider population
|
|
63
|
+
// this predicate matches against since bug 0339 — but the reason is inertness,
|
|
64
|
+
// not reachability. The two differ only by `'**\/'`-led globs, and
|
|
65
|
+
// `syntacticFault`'s single base-sensitive branch is
|
|
66
|
+
// `base === 'absolute' && !isAnchored(glob)`, which such a glob never reaches.
|
|
67
|
+
// So declaring the wider population would change no verdict, and
|
|
68
|
+
// `base: 'absolute'` stays reachable either way — `'*/x/**'` still declares it
|
|
69
|
+
// and still trips `unanchored`. (An earlier version of this comment claimed
|
|
70
|
+
// the wider predicate would make that fault dead code. It would not; the
|
|
71
|
+
// decision is right and the stated reason was wrong.)
|
|
72
|
+
globs: globNode({
|
|
73
|
+
glob,
|
|
74
|
+
kind: 'file-path',
|
|
75
|
+
base: isProjectRelative(glob) ? 'normalized' : 'absolute',
|
|
76
|
+
}),
|
|
61
77
|
description: `reside in file matching "${glob}"`,
|
|
62
78
|
test: (element) => {
|
|
63
79
|
const sourceFile = element.getSourceFile();
|
|
64
|
-
|
|
65
|
-
if (isMatch(filePath))
|
|
66
|
-
return true;
|
|
67
|
-
if (!relative)
|
|
68
|
-
return false;
|
|
69
|
-
const fromRoot = relativeToRoot(sourceFile, filePath);
|
|
70
|
-
return fromRoot !== undefined && isMatch(fromRoot);
|
|
80
|
+
return matchesPath(matcher, sourceFile, sourceFile.getFilePath());
|
|
71
81
|
},
|
|
72
82
|
};
|
|
73
83
|
}
|
|
@@ -80,8 +90,7 @@ export function resideInFile(glob) {
|
|
|
80
90
|
* resideInFolder('** /src/services/**')
|
|
81
91
|
*/
|
|
82
92
|
export function resideInFolder(glob) {
|
|
83
|
-
const
|
|
84
|
-
const relative = isProjectRelative(glob);
|
|
93
|
+
const matcher = pathGlobMatcher(glob);
|
|
85
94
|
return {
|
|
86
95
|
// `parent-dir`, not `file-path`: the test below reads the directory
|
|
87
96
|
// portion, so this glob is matched against the immediate parent and
|
|
@@ -89,23 +98,20 @@ export function resideInFolder(glob) {
|
|
|
89
98
|
globs: globNode({
|
|
90
99
|
glob,
|
|
91
100
|
kind: 'parent-dir',
|
|
92
|
-
base:
|
|
101
|
+
base: isProjectRelative(glob) ? 'normalized' : 'absolute',
|
|
93
102
|
}),
|
|
94
103
|
description: `reside in folder matching "${glob}"`,
|
|
95
104
|
test: (element) => {
|
|
96
105
|
const sourceFile = element.getSourceFile();
|
|
97
106
|
const filePath = sourceFile.getFilePath();
|
|
98
107
|
const dirPath = filePath.substring(0, filePath.lastIndexOf('/'));
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
|
|
106
|
-
return false;
|
|
107
|
-
const fromRoot = relativeToRoot(sourceFile, dirPath);
|
|
108
|
-
return fromRoot !== undefined && isMatch(fromRoot);
|
|
108
|
+
// The same directory, named from the project root, as well as absolutely
|
|
109
|
+
// (plan 0067 C; bug 0339 extended it to the `'**\/'`-led spelling, which
|
|
110
|
+
// is the one that could not match from a project path holding a
|
|
111
|
+
// dot-segment). `'src/domain/**'` means that folder AT THE ROOT, which is
|
|
112
|
+
// narrower and more accurate than the `'**/src/domain/**'` the old advice
|
|
113
|
+
// prescribed.
|
|
114
|
+
return matchesPath(matcher, sourceFile, dirPath);
|
|
109
115
|
},
|
|
110
116
|
};
|
|
111
117
|
}
|
|
@@ -130,20 +136,15 @@ export function resideInFolder(glob) {
|
|
|
130
136
|
* modules(p).that().havePathMatching('** /services/*.ts')
|
|
131
137
|
*/
|
|
132
138
|
export function havePathMatching(glob) {
|
|
133
|
-
const
|
|
134
|
-
const relative = isProjectRelative(glob);
|
|
139
|
+
const matcher = pathGlobMatcher(glob);
|
|
135
140
|
return {
|
|
136
|
-
globs: globNode({
|
|
141
|
+
globs: globNode({
|
|
142
|
+
glob,
|
|
143
|
+
kind: 'file-path',
|
|
144
|
+
base: isProjectRelative(glob) ? 'normalized' : 'absolute',
|
|
145
|
+
}),
|
|
137
146
|
description: `have path matching "${glob}"`,
|
|
138
|
-
test: (sourceFile) =>
|
|
139
|
-
const filePath = sourceFile.getFilePath();
|
|
140
|
-
if (isMatch(filePath))
|
|
141
|
-
return true;
|
|
142
|
-
if (!relative)
|
|
143
|
-
return false;
|
|
144
|
-
const fromRoot = relativeToRoot(sourceFile, filePath);
|
|
145
|
-
return fromRoot !== undefined && isMatch(fromRoot);
|
|
146
|
-
},
|
|
147
|
+
test: (sourceFile) => matchesPath(matcher, sourceFile, sourceFile.getFilePath()),
|
|
147
148
|
};
|
|
148
149
|
}
|
|
149
150
|
// --- Export predicates ---
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/predicates/identity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/predicates/identity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ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icates/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/predicates/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAsD9D;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC,UAAU,CAAC,CAAA;AAC1F,wBAAgB,UAAU,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,UAAU,CAAC,CAAA;AAarE;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC,UAAU,CAAC,CAAA;AAC7F,wBAAgB,aAAa,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,UAAU,CAAC,CAAA;AAkBxE;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC,UAAU,CAAC,CAKrE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import picomatch from 'picomatch';
|
|
2
1
|
import { globAnyOf } from '@nielspeter/eess';
|
|
3
2
|
import { splitGlobArgs } from '../core/import-options.js';
|
|
4
|
-
import { candidatesFor } from '../core/import-candidates.js';
|
|
3
|
+
import { candidatesFor, importTargetMatcher } from '../core/import-candidates.js';
|
|
5
4
|
import { edgesOf, FORWARD_EDGE_KINDS } from '../core/module-edges.js';
|
|
6
5
|
import { rootOf } from '../core/project-relative.js';
|
|
7
6
|
/**
|
|
@@ -53,7 +52,7 @@ function importCandidatePaths(sourceFile, ignoreTypeImports = false) {
|
|
|
53
52
|
export function importFrom(...args) {
|
|
54
53
|
const { globs, options } = splitGlobArgs(args);
|
|
55
54
|
const ignoreType = options?.ignoreTypeImports === true;
|
|
56
|
-
const matchers = globs.map((g) =>
|
|
55
|
+
const matchers = globs.map((g) => importTargetMatcher(g));
|
|
57
56
|
return {
|
|
58
57
|
globs: globAnyOf(globs, 'import-target'),
|
|
59
58
|
description: 'import from ' + globs.map((g) => `"${g}"`).join(', '),
|
|
@@ -63,7 +62,7 @@ export function importFrom(...args) {
|
|
|
63
62
|
export function notImportFrom(...args) {
|
|
64
63
|
const { globs, options } = splitGlobArgs(args);
|
|
65
64
|
const ignoreType = options?.ignoreTypeImports === true;
|
|
66
|
-
const matchers = globs.map((g) =>
|
|
65
|
+
const matchers = globs.map((g) => importTargetMatcher(g));
|
|
67
66
|
return {
|
|
68
67
|
// `import-target` is never checked against the path universe: an installed
|
|
69
68
|
// package resolves into node_modules, which is outside the project by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/predicates/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/predicates/module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAEpD;;;;;;;;GAQG;AACH,MAAM,eAAe,GAAG,kBAAkB,CAAA;AAE1C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAS,oBAAoB,CAAC,UAAsB,EAAE,iBAAiB,GAAG,KAAK;IAC7E,OAAO,CACL,OAAO,CAAC,UAAU,CAAC;SAChB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,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"agent-guardrails.d.ts","sourceRoot":"","sources":["../../src/presets/agent-guardrails.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAoBrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAYpD;;;;;GAKG;AACH,KAAK,qBAAqB,GACtB,gCAAgC,MAAM,EAAE,GACxC,gCAAgC,GAChC,uBAAuB,GACvB,8BAA8B,GAC9B,4BAA4B,GAC5B,uCAAuC,CAAA;AAE3C,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB,CAAC,qBAAqB,CAAC;IACtF,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAA;IACX,sFAAsF;IACtF,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B;;;;;;;;;;;;;;;;;;OAkBG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB;AAuGD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,CAAC,EAAE,WAAW,EACd,OAAO,EAAE,sBAAsB,GAAG;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GACvD,eAAe,EAAE,CAAA;AACpB,wBAAgB,eAAe,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,sBAAsB,GAAG,aAAa,CAAA"}
|
|
@@ -2,13 +2,14 @@ import { functions } from '../builders/function-rule-builder.js';
|
|
|
2
2
|
import { modules } from '../builders/module-rule-builder.js';
|
|
3
3
|
import { resideInFile } from '../predicates/identity.js';
|
|
4
4
|
import { not, or } from '../core/combinators.js';
|
|
5
|
-
import { isDeadSite } from '../core/glob-evaluator.js';
|
|
6
5
|
import { isProjectRelative } from '../core/project-relative.js';
|
|
6
|
+
import { isDeadSite } from '../core/glob-evaluator.js';
|
|
7
7
|
import { pathUniverse } from '../core/path-universe.js';
|
|
8
8
|
import { collectResult } from '@nielspeter/eess';
|
|
9
9
|
import { UNSUPPRESSABLE } from '@nielspeter/eess/internal';
|
|
10
10
|
import { call } from '../helpers/matchers.js';
|
|
11
|
-
import {
|
|
11
|
+
import { moduleNoGenericErrors } from '../rules/errors.js';
|
|
12
|
+
import { moduleNotContain } from '../conditions/body-analysis-module.js';
|
|
12
13
|
import { noStubComments, noEmptyBodies } from '../rules/hygiene.js';
|
|
13
14
|
import { smells } from '../smells/index.js';
|
|
14
15
|
import { overrideFindings, validateOverrides, declareEmptyIfListed, presetDeclarationSpelling, declaredEmptyFindings, assertEnabled, deliver, } from './shared.js';
|
|
@@ -78,8 +79,29 @@ const EMITTERS = /(^|\.)(finishPreset|reportViolations|throwIfViolations)$/;
|
|
|
78
79
|
* `imperative` metadata so `explain --format agent` and the check JSON give the
|
|
79
80
|
* agent an actionable fix.
|
|
80
81
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
82
|
+
* **What each rule reads** (bug 0337, applying bug 0333's ruling): each rule reads
|
|
83
|
+
* the broadest subject its condition has a variant for, and exactly ONE, because
|
|
84
|
+
* the subject kinds nest — a module's search reads the whole file, so running two
|
|
85
|
+
* of them under one rule id would report the same match twice.
|
|
86
|
+
*
|
|
87
|
+
* | rule | reads |
|
|
88
|
+
* | ----------------------------- | --------------------------------------- |
|
|
89
|
+
* | `no-inline-logic/<api>` | the whole **file** |
|
|
90
|
+
* | `no-generic-errors` | the whole **file** |
|
|
91
|
+
* | `no-stubs` | each **function** body |
|
|
92
|
+
* | `no-empty-bodies` | each **function** body |
|
|
93
|
+
* | `no-copy-paste` | function bodies, pairwise |
|
|
94
|
+
* | `no-verdict-outside-rules` | the whole **file** |
|
|
95
|
+
*
|
|
96
|
+
* The two file-reading rules therefore see a bare top-level call, one in a class's
|
|
97
|
+
* static block, and one in a field initializer. A match with nothing named
|
|
98
|
+
* enclosing it is reported against the file.
|
|
99
|
+
*
|
|
100
|
+
* This paragraph read "Uses function-variant rules so standalone functions, arrow
|
|
101
|
+
* functions, and class members are all covered" until 0337 made two of the six
|
|
102
|
+
* read a module. It is the hover text an adopter sees, and leaving it would have
|
|
103
|
+
* been a comment outliving its mechanism — the defect this change fixed one file
|
|
104
|
+
* over, in `recommended.ts`, and then nearly repeated here.
|
|
83
105
|
*/
|
|
84
106
|
// Presets collect object-literal functions unconditionally. `functions()`
|
|
85
107
|
// keeps these anonymous values opt-in because every inline callback would flood
|
|
@@ -118,25 +140,47 @@ export function agentGuardrails(p, options) {
|
|
|
118
140
|
}
|
|
119
141
|
};
|
|
120
142
|
for (const api of options.noInlineLogic ?? []) {
|
|
121
|
-
|
|
143
|
+
// `modules()`, not `functions()` — bug 0337, applying bug 0333's ruling to this
|
|
144
|
+
// preset: each rule reads the broadest subject its condition has a variant for,
|
|
145
|
+
// and exactly one, because the subject kinds nest. `moduleNotContain` reads the
|
|
146
|
+
// whole file, so a bare top-level call, one in a class's static block and one in
|
|
147
|
+
// a field initializer are reported — measured silent before this, under a rule
|
|
148
|
+
// the adopter had named `eval`.
|
|
149
|
+
push(modules(p)
|
|
150
|
+
.that()
|
|
151
|
+
.resideInFile(options.src)
|
|
152
|
+
.should()
|
|
153
|
+
.satisfy(moduleNotContain(call(api))), {
|
|
122
154
|
id: `preset/agent/no-inline-logic/${api}`,
|
|
123
|
-
|
|
155
|
+
// NOT "inline in a function" — this rule reads the whole file since bug
|
|
156
|
+
// 0337, so a top-level call would have rendered with a rationale naming a
|
|
157
|
+
// construct the code does not contain. `because` is surfaced on every
|
|
158
|
+
// violation and is the agent-actionable half, so a wrong one sends the
|
|
159
|
+
// author to the wrong place. It is not hashed (`hashViolation` composes
|
|
160
|
+
// `rule::subjectOf`), so correcting it moves no adopter's baseline entry.
|
|
161
|
+
because: `an inline ${api} call is logic that belongs behind a named helper`,
|
|
124
162
|
suggestion: `extract the ${api} call into a named helper function`,
|
|
125
163
|
imperative: `Do NOT call ${api} inline — extract it behind a named helper`,
|
|
126
164
|
}, 'error');
|
|
127
165
|
}
|
|
128
166
|
if (options.noGenericErrors) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
167
|
+
// `modules()` too, and the reason is this rule's OWN wording: its imperative is
|
|
168
|
+
// "Do NOT throw new Error()", not "…in a function", so a throw at module scope
|
|
169
|
+
// or in a static block was a false green against the rule as written (bug 0337).
|
|
170
|
+
// That test — does the rule's own imperative claim more than its subject reads —
|
|
171
|
+
// is what puts this rule in scope and leaves `no-stubs` out of it.
|
|
172
|
+
push(modules(p).that().resideInFile(options.src).should().satisfy(moduleNoGenericErrors()), {
|
|
134
173
|
id: 'preset/agent/no-generic-errors',
|
|
135
174
|
because: 'a generic Error loses the type/context callers need to handle it',
|
|
136
175
|
suggestion: 'throw a domain-specific error (NotFoundError, ValidationError, …)',
|
|
137
176
|
imperative: 'Do NOT throw new Error() — throw a domain-specific error class',
|
|
138
177
|
}, 'error');
|
|
139
178
|
}
|
|
179
|
+
// `functions()`, deliberately, and bug 0337 measured the case for leaving it:
|
|
180
|
+
// a `// TODO` at the end of a file or above a class IS unreported. That is not a
|
|
181
|
+
// false green, because this rule's imperative says "in a function body" — the
|
|
182
|
+
// wording and the reading agree. Widening it would be new coverage under an
|
|
183
|
+
// existing id, which is a different change with its own adopter cost.
|
|
140
184
|
if (options.noStubs) {
|
|
141
185
|
push(functions(p, COLLECT_ALL).that().resideInFile(options.src).should().satisfy(noStubComments()), {
|
|
142
186
|
id: 'preset/agent/no-stubs',
|
|
@@ -145,6 +189,8 @@ export function agentGuardrails(p, options) {
|
|
|
145
189
|
imperative: 'Do NOT leave stub comments (TODO/FIXME/"not implemented") in a function body',
|
|
146
190
|
}, 'error');
|
|
147
191
|
}
|
|
192
|
+
// `functions()`, per bug 0333's ruling: an empty body is a fact about a function
|
|
193
|
+
// and has no meaning at module scope.
|
|
148
194
|
if (options.noEmptyBodies) {
|
|
149
195
|
push(functions(p, COLLECT_ALL).that().resideInFile(options.src).should().satisfy(noEmptyBodies()), {
|
|
150
196
|
id: 'preset/agent/no-empty-bodies',
|
|
@@ -340,9 +386,14 @@ function ruleFilesFindings(p, options) {
|
|
|
340
386
|
// of its guards on, and the remedy it printed told the adopter to WIDEN a
|
|
341
387
|
// correctly-scoped exemption to silence a finding that was wrong.
|
|
342
388
|
//
|
|
343
|
-
// So the derivation is `resideInFile`'s own, taken from the same helper:
|
|
344
|
-
//
|
|
345
|
-
//
|
|
389
|
+
// So the derivation is `resideInFile`'s own, taken from the same helper: the
|
|
390
|
+
// exemption is applied through `resideInFile(glob)` a few lines above, and this
|
|
391
|
+
// declares the base that predicate declares. Bug 0339 widened what
|
|
392
|
+
// `resideInFile` MATCHES against (a `'**\/'`-led glob reads the root-relative
|
|
393
|
+
// view too) without widening what it DECLARES, because the anchor check is a
|
|
394
|
+
// no-op for an anchored glob and widening it would make the `unanchored` fault
|
|
395
|
+
// unreachable. The two derivations must not drift, which is what the paragraph
|
|
396
|
+
// above is about.
|
|
346
397
|
const dead = declared.filter((glob) => isDeadSite({
|
|
347
398
|
glob,
|
|
348
399
|
kind: 'file-path',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-guardrails.js","sourceRoot":"","sources":["../../src/presets/agent-guardrails.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,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oB,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACtD,IAAI,EAAE,qBAAqB,IAAI,GAAG;QAClC,MAAM,EAAE,yCAAyC;QACjD,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,CAAC;QACP,OAAO,EAAE,oBAAoB,IAAI,2DAA2D;QAC5F,OAAO,EACL,2FAA2F;YAC3F,4FAA4F;YAC5F,0CAA0C;QAC5C,UAAU,EACR,iFAAiF;YACjF,kFAAkF;YAClF,oFAAoF;YACpF,iCAAiC;YACjC,cAAc;QAChB,aAAa,EAAE,IAAI;KACpB,CAAC,CAAC,CAAA;IACH,8EAA8E;IAC9E,2EAA2E;IAC3E,OAAO,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;AAC3E,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { matchesPath, pathGlobMatcher } from '../core/project-relative.js';
|
|
2
2
|
import { slices } from '../builders/slice-rule-builder.js';
|
|
3
3
|
import { modules } from '../builders/module-rule-builder.js';
|
|
4
4
|
import { smells } from '../smells/index.js';
|
|
@@ -66,11 +66,20 @@ export function strictBoundaries(p, options) {
|
|
|
66
66
|
const builders = [];
|
|
67
67
|
// Discover boundary folders from the glob pattern
|
|
68
68
|
const boundaryGlob = options.folders;
|
|
69
|
-
const matcher =
|
|
69
|
+
const matcher = pathGlobMatcher(boundaryGlob);
|
|
70
70
|
const boundaryFolders = [];
|
|
71
71
|
for (const sf of p.getSourceFiles()) {
|
|
72
72
|
const dir = sf.getFilePath().replace(/\/[^/]+$/, '');
|
|
73
|
-
|
|
73
|
+
// Through the shared matcher — bug 0339. The comment on the `shared` guard
|
|
74
|
+
// below argued for a guard over normalization, and its reason was symmetry:
|
|
75
|
+
// "`folders` is not normalized either". That reason survives, because BOTH
|
|
76
|
+
// read the root-relative view now. What did not survive is the other half of
|
|
77
|
+
// it — that the remedy "states the absolute-path contract and tells the
|
|
78
|
+
// caller how to spell it". From a project path holding a dot-segment there
|
|
79
|
+
// was no spelling that worked: picomatch's default `dot: false` stops `**`
|
|
80
|
+
// crossing it, so the documented `'**\/src/*'` discovered 0 boundaries and
|
|
81
|
+
// the guard told the adopter their correct glob was wrong.
|
|
82
|
+
if (matchesPath(matcher, sf, dir, p.tsConfigPath) && !boundaryFolders.includes(dir)) {
|
|
74
83
|
boundaryFolders.push(dir);
|
|
75
84
|
}
|
|
76
85
|
}
|
|
@@ -81,15 +90,27 @@ export function strictBoundaries(p, options) {
|
|
|
81
90
|
sliceDef[name] = `${dir}/**`;
|
|
82
91
|
}
|
|
83
92
|
// --- Discovery guard: a boundaries preset that finds no boundaries is
|
|
84
|
-
// misconfigured (
|
|
85
|
-
//
|
|
93
|
+
// misconfigured. (The parenthetical here used to read "globs match
|
|
94
|
+
// absolute paths — a project-relative glob matches nothing"; bug 0339
|
|
95
|
+
// made that false, and the remedy below no longer says it.) Fail loudly
|
|
96
|
+
// instead of generating zero rules
|
|
86
97
|
// (the exact false green of ADR-008 / plan 0067), rather than the old
|
|
87
98
|
// silent skip. ---
|
|
88
99
|
builders.push(...assertDiscovered(boundaryFolders, {
|
|
89
100
|
id: 'preset/boundaries/discovery',
|
|
90
101
|
glob: boundaryGlob,
|
|
91
|
-
remedy
|
|
92
|
-
|
|
102
|
+
// The remedy states what is TRUE after bug 0339, and no longer offers a
|
|
103
|
+
// prefix that would be a no-op. Discovery reads the absolute path AND the
|
|
104
|
+
// path named from the project root, so "prefix it with `**/`" is not a
|
|
105
|
+
// fix — for an already-anchored dead glob it produced
|
|
106
|
+
// `'**/**/no-such-dir/**'`, which reproduces the identical finding and
|
|
107
|
+
// loops an agent (ADR-009 rule 2: a remedy must remediate). What is left
|
|
108
|
+
// after the fix is a glob dead in BOTH views, so the honest answer is the
|
|
109
|
+
// causes, not a spelling.
|
|
110
|
+
remedy: `Boundary discovery tried '${boundaryGlob}' against both the absolute file path and the ` +
|
|
111
|
+
`path named from the project root, and it matched no folder. Common causes: a path segment ` +
|
|
112
|
+
`does not match what is on disk, the folder holds no source files your tsconfig includes, or ` +
|
|
113
|
+
`a '.'/'..' segment in the glob (neither occurs in either form — remove it).`,
|
|
93
114
|
}));
|
|
94
115
|
// --- Discovery guard for `shared`, mirroring the one above for `folders` ---
|
|
95
116
|
//
|
|
@@ -110,11 +131,15 @@ export function strictBoundaries(p, options) {
|
|
|
110
131
|
// middle two rows are indistinguishable from outside — same violation count,
|
|
111
132
|
// no explanation — which is what the guard fixes.
|
|
112
133
|
//
|
|
113
|
-
// A GUARD,
|
|
134
|
+
// A GUARD **and** normalization, since bug 0339 — this paragraph used to argue
|
|
135
|
+
// for the guard alone, on the ground that "`folders` is not normalized either;
|
|
114
136
|
// its remedy states the absolute-path contract and tells the caller how to
|
|
115
|
-
// spell it.
|
|
116
|
-
//
|
|
117
|
-
// the one
|
|
137
|
+
// spell it". The symmetry half survives, because both options normalize now.
|
|
138
|
+
// The other half did not: from a project path holding a dot-segment there was
|
|
139
|
+
// no spelling that worked, so the remedy could not state one — and
|
|
140
|
+
// `docs/presets.md` documents the project-relative spelling for both options,
|
|
141
|
+
// which discovered nothing. The guard keeps its job for a glob dead in both
|
|
142
|
+
// views.
|
|
118
143
|
//
|
|
119
144
|
// Matched against FILE paths, not `atPath`'s file-or-folder: the allow list is
|
|
120
145
|
// what this guard is about, and `onlyImportFrom` matches resolved file paths.
|
|
@@ -122,14 +147,31 @@ export function strictBoundaries(p, options) {
|
|
|
122
147
|
// `shared-isolation` via `atPath` yet creates no allowance, so it is a genuine
|
|
123
148
|
// fault here and the guard must fire for it.
|
|
124
149
|
for (const sharedGlob of sharedGlobs) {
|
|
125
|
-
const matchesFile =
|
|
126
|
-
|
|
150
|
+
const matchesFile = pathGlobMatcher(sharedGlob);
|
|
151
|
+
// The root-relative view too, as `folders` above and as `onlyImportFrom`
|
|
152
|
+
// already did through `candidatesFor` — bug 0339.
|
|
153
|
+
const matchedFiles = p
|
|
154
|
+
.getSourceFiles()
|
|
155
|
+
.filter((sf) => matchesPath(matchesFile, sf, sf.getFilePath(), p.tsConfigPath));
|
|
127
156
|
builders.push(...assertDiscovered(matchedFiles, {
|
|
128
157
|
id: 'preset/boundaries/shared-discovery',
|
|
129
158
|
glob: sharedGlob,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
159
|
+
// Two corrections after bug 0339, both because the sentence outlived its
|
|
160
|
+
// mechanism. It said the glob "is matched against absolute file paths"
|
|
161
|
+
// (no longer true — both views are tried) and that it "creates no
|
|
162
|
+
// allowance" (never reliable: the allow list reaches `onlyImportFrom` →
|
|
163
|
+
// `candidatesFor`, which appends the root-relative resolved path
|
|
164
|
+
// UNCONDITIONALLY, so for the residual population — `'*/shared/**'`,
|
|
165
|
+
// `'./src/shared/**'` — an allowance does exist while this guard fires).
|
|
166
|
+
// ADR-009 rule 2 takes the fact the guard can support over the cause it
|
|
167
|
+
// cannot. The `'/**'` advice stays, because a folder glob with no
|
|
168
|
+
// trailing `/**` really does select files for `atPath` and create no
|
|
169
|
+
// allowance — that is this guard's own neighbouring test.
|
|
170
|
+
remedy: `A shared glob is tried against the absolute file path and the path named from the project ` +
|
|
171
|
+
`root, and '${sharedGlob}' matched no file in this project. A shared entry must match FILES ` +
|
|
172
|
+
`to create an allowance, so a folder glob needs a trailing '/**' ` +
|
|
173
|
+
`(e.g. '${sharedGlob.replace(/\/\*\*$/, '')}/**'); otherwise a path segment does not match ` +
|
|
174
|
+
`what is on disk, or the folder holds no source files your tsconfig includes.`,
|
|
133
175
|
}));
|
|
134
176
|
}
|
|
135
177
|
// --- No cycles between boundaries ---
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boundaries.js","sourceRoot":"","sources":["../../src/presets/boundaries.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"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EAAE,GAAG,qBAAqB,CAAC,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,GAAG,QAAQ,CAAC,EAC7F,OAAO,CACR,CAAA;AACH,CAAC"}
|
|
@@ -85,12 +85,27 @@ type RecommendedRuleId = (typeof SPECS)[number]['meta']['id'];
|
|
|
85
85
|
* glob is dead) is `error` regardless of severity and fails the build: `'warn'`
|
|
86
86
|
* grades violations, not a rule that cannot enforce anything.
|
|
87
87
|
*
|
|
88
|
-
* Overlaps `agentGuardrails` on empty bodies and `eval`, and the two
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* `'off'` in one of them if the doubled finding is noise.
|
|
88
|
+
* Overlaps `agentGuardrails` on empty bodies and `eval`, and since bug 0337 the two READ the same
|
|
89
|
+
* code again. Between 0333 and 0337 they did not: this preset's `eval` rule read the whole file
|
|
90
|
+
* while `agentGuardrails` still read function bodies, so "prefer `agentGuardrails` alone" — which
|
|
91
|
+
* this comment once advised, then withdrew — meant less coverage. Both now read module scope for
|
|
92
|
+
* the rules this ruling moved, so running both doubles a finding rather than hiding one; override a
|
|
93
|
+
* duplicated id to `'off'` in one of them if the doubled finding is noise.
|
|
94
|
+
*
|
|
95
|
+
* "the rules this ruling MOVED" and not "the rules whose conditions have a module variant" — review
|
|
96
|
+
* caught the wider phrasing being false as written: `no-stubs`' condition has a module variant and
|
|
97
|
+
* still reads functions, deliberately
|
|
98
|
+
* ([0344](../../../../work/bugs/0344-no-stubs-reads-function-bodies-though-its-condition-has-a-module-variant.md)).
|
|
99
|
+
* This paragraph replaced one that outlived its mechanism; seeding the replacement with a claim that
|
|
100
|
+
* was already half-stale would have been the same defect in a shorter life.
|
|
101
|
+
*
|
|
102
|
+
* **Two tables, kept in step by hand, and that is the standing risk.** 0333 made the subject ruling
|
|
103
|
+
* for this preset's `SPECS` and 0337 applied it to the sibling — two records for one decision,
|
|
104
|
+
* because nothing binds them. Whether they should agree by construction is the open question in
|
|
105
|
+
* [0343](../../../../work/bugs/0343-two-presets-carry-one-subject-ruling-in-two-tables.md) — an OPEN
|
|
106
|
+
* record, deliberately: this sentence used to point at 0337, which is closed and in the folder the
|
|
107
|
+
* corpus gate freezes, so the question it called open had no live home. What exists today is this
|
|
108
|
+
* paragraph.
|
|
94
109
|
*/
|
|
95
110
|
/**
|
|
96
111
|
* `report` names a delivery mode; omitting it returns the un-executed builders.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommended.d.ts","sourceRoot":"","sources":["../../src/presets/recommended.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAQ1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAUpD,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB,CAAC,iBAAiB,CAAC;IAC9E;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AA0BD;;;;GAIG;AACH,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6C6B,CAAA;AAwBxC;;;;;GAKG;AACH,KAAK,iBAAiB,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAA;AAI7D
|
|
1
|
+
{"version":3,"file":"recommended.d.ts","sourceRoot":"","sources":["../../src/presets/recommended.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE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