paperlint 18.3.2 → 18.4.1
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/adapters/memory/index.d.ts +6 -0
- package/dist/adapters/memory/index.d.ts.map +1 -1
- package/dist/adapters/memory/index.js +11 -0
- package/dist/adapters/memory/index.js.map +1 -1
- package/dist/adapters/node/index.d.ts +1 -0
- package/dist/adapters/node/index.d.ts.map +1 -1
- package/dist/adapters/node/index.js +1 -0
- package/dist/adapters/node/index.js.map +1 -1
- package/dist/adapters/node/list-tree.io.d.ts +3 -0
- package/dist/adapters/node/list-tree.io.d.ts.map +1 -0
- package/dist/adapters/node/list-tree.io.js +23 -0
- package/dist/adapters/node/list-tree.io.js.map +1 -0
- package/dist/adapters/study-registry/index.d.ts +2 -2
- package/dist/artifact-rules.d.ts +26 -0
- package/dist/artifact-rules.d.ts.map +1 -0
- package/dist/artifact-rules.js +117 -0
- package/dist/artifact-rules.js.map +1 -0
- package/dist/cli.d.ts +2 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +49 -20
- package/dist/cli.js.map +1 -1
- package/dist/domain/artifact.d.ts +36 -0
- package/dist/domain/artifact.d.ts.map +1 -0
- package/dist/domain/artifact.js +116 -0
- package/dist/domain/artifact.js.map +1 -0
- package/dist/domain/paper-dirs.d.ts +16 -0
- package/dist/domain/paper-dirs.d.ts.map +1 -0
- package/dist/domain/paper-dirs.js +42 -0
- package/dist/domain/paper-dirs.js.map +1 -0
- package/dist/lib/paper-config.d.ts.map +1 -1
- package/dist/lib/paper-config.js +2 -0
- package/dist/lib/paper-config.js.map +1 -1
- package/dist/paper-files.d.ts +25 -42
- package/dist/paper-files.d.ts.map +1 -1
- package/dist/paper-files.js +101 -9
- package/dist/paper-files.js.map +1 -1
- package/dist/paper-settings.d.ts +3 -0
- package/dist/paper-settings.d.ts.map +1 -1
- package/dist/paper-settings.js +19 -16
- package/dist/paper-settings.js.map +1 -1
- package/dist/ports/list-tree.d.ts +11 -0
- package/dist/ports/list-tree.d.ts.map +1 -0
- package/dist/ports/list-tree.js +2 -0
- package/dist/ports/list-tree.js.map +1 -0
- package/docs/configuration.md +2 -1
- package/docs/rules/artifact/promised.md +64 -0
- package/docs/rules/artifact/required-files.md +65 -0
- package/docs/rules.md +2 -0
- package/lib/paper-config.ts +3 -0
- package/package.json +1 -1
- package/src/adapters/memory/index.test.ts +9 -0
- package/src/adapters/memory/index.ts +15 -0
- package/src/adapters/node/index.ts +1 -0
- package/src/adapters/node/list-tree.io.ts +27 -0
- package/src/adapters/node/list-tree.test.ts +38 -0
- package/src/artifact-rules.test.ts +50 -0
- package/src/artifact-rules.ts +188 -0
- package/src/cli.test.ts +122 -0
- package/src/cli.ts +59 -18
- package/src/domain/artifact.test.ts +154 -0
- package/src/domain/artifact.ts +171 -0
- package/src/domain/paper-dirs.test.ts +91 -0
- package/src/domain/paper-dirs.ts +62 -0
- package/src/new-paper.test.ts +9 -3
- package/src/paper-files.test.ts +88 -0
- package/src/paper-files.ts +98 -9
- package/src/paper-settings-commands.test.ts +18 -0
- package/src/paper-settings.test.ts +19 -0
- package/src/paper-settings.ts +21 -16
- package/src/ports/list-tree.ts +11 -0
- package/src/rule-cases.test.ts +134 -1
package/dist/paper-files.d.ts
CHANGED
|
@@ -1,46 +1,29 @@
|
|
|
1
|
+
import type { ConfigBlock, RuleBlock, RuleEntry } from "./rules-config.ts";
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* into two things ESLint understands:
|
|
7
|
-
*
|
|
8
|
-
* 1. **A global ignore of everything else** (`scopeToOwned`). Handing ESLint a directory is not
|
|
9
|
-
* enough: its built-in defaults lint every JavaScript file it finds, whatever our config says.
|
|
10
|
-
* Measured on a consumer project with vendored code under a paper's `repro/` folder: 1,877
|
|
11
|
-
* files, 74 errors ("'return' outside of function", "Definition for rule … was not found"),
|
|
12
|
-
* zero of them on a paper file, exit 1 — and nothing in the settings could turn it off. With
|
|
13
|
-
* the ignore, a stray script under the papers directory is never enumerated at all, and a file
|
|
14
|
-
* named on the command line can be asked about (`ESLint#isPathIgnored`) with ESLint's own
|
|
15
|
-
* matcher instead of a hand-written one.
|
|
16
|
-
*
|
|
17
|
-
* 2. **Each rule scoped to the files it was written for** (`ruleOwners` + `narrowToOwners`).
|
|
18
|
-
* One plugin NAME is bound to different plugin objects in different blocks: `paper` holds
|
|
19
|
-
* `stages`/`source`/`author-list` beside `PIPELINE-STATUS.md` and `typography` beside
|
|
20
|
-
* `paper.tex`. So a consumer block that named `paper/source`
|
|
21
|
-
* for every file under the papers directory reached `paper.tex`, where `paper` has no `source`
|
|
22
|
-
* — and ESLint threw `Could not find "source" in plugin "paper"` from inside `lintFiles`,
|
|
23
|
-
* after paperlint's own validation had (correctly) accepted the id. A block is therefore split
|
|
24
|
-
* per owner and its `files` ANDed with the owner's (ESLint's nested-array form), so a rule can
|
|
25
|
-
* only land where its plugin is registered.
|
|
26
|
-
*
|
|
27
|
-
* Both read ONE definition of "the files paperlint lints": `ownedScopes`, each own block's `files`
|
|
28
|
-
* together with its `ignores`. The globs alone are not that definition. The sibling-card block
|
|
29
|
-
* claims every markdown file under `siblings/` EXCEPT the index, and a rule whose plugin is
|
|
30
|
-
* registered for every file (`pdf`) used to keep the consumer block's `files` as they were — so a
|
|
31
|
-
* venue preset's rules reached `siblings/README.md`, a block with no `language` matched it, and
|
|
32
|
-
* ESLint parsed the markdown as JavaScript (#101). Now every generated block narrows to scopes,
|
|
33
|
-
* exceptions included, and a plugin registered everywhere owns exactly what paperlint lints.
|
|
34
|
-
*
|
|
35
|
-
* ESLint's semantics that this leans on, each measured against ESLint 10 before writing it:
|
|
36
|
-
* - a global-ignore pattern that matches a DIRECTORY hides everything inside it, so directories
|
|
37
|
-
* must be un-ignored (`!` + a pattern ending in a slash) before owned files can be;
|
|
38
|
-
* - that un-ignores `node_modules/` and `.git/` too — ESLint's own defaults — so they are
|
|
39
|
-
* re-ignored after, or a `paper.tex` inside a dependency would be linted;
|
|
40
|
-
* - later global-ignore patterns win, across blocks, in config order;
|
|
41
|
-
* - `files: [["a", "b"]]` matches a file only when BOTH patterns match.
|
|
3
|
+
* Which papers' own files paperlint's blocks claim. `any` is the config's SHAPE, for the rule list and
|
|
4
|
+
* the docs: a file in any folder. `papers` is what `paperlint lint` runs on: the real papers, as glob
|
|
5
|
+
* prefixes relative to ESLint's `cwd` ("" for `cwd` itself), so a copy of a paper kept inside one (a
|
|
6
|
+
* review snapshot, a build copy) is claimed by no block (#582).
|
|
42
7
|
*/
|
|
43
|
-
|
|
8
|
+
export type PaperScope = {
|
|
9
|
+
readonly kind: "any";
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: "papers";
|
|
12
|
+
readonly cwd: string;
|
|
13
|
+
readonly prefixes: readonly string[];
|
|
14
|
+
};
|
|
15
|
+
export declare const ANY_PAPER: PaperScope;
|
|
16
|
+
/** The papers `dirs` under ESLint's `cwd`: the scope `paperlint lint` lints. Pure. */
|
|
17
|
+
export declare const papersScope: (dirs: readonly string[], cwd: string) => PaperScope;
|
|
18
|
+
/** A glob of a paper's own file (`paper.tex`, `reviews/*.md`) in each paper of `scope`. Pure. */
|
|
19
|
+
export declare const paperFiles: (scope: PaperScope, glob: string) => readonly string[];
|
|
20
|
+
/**
|
|
21
|
+
* A glob relative to `cwd`, as the block whose `basePath` is `base` must write it — ESLint reads a
|
|
22
|
+
* block's patterns from its `basePath`, and a paper's own settings carry the paper's folder. None
|
|
23
|
+
* when the glob names files outside `base`: that block can never reach them. A glob that starts with
|
|
24
|
+
* `**` matches at any depth and is kept as it is. Pure.
|
|
25
|
+
*/
|
|
26
|
+
export declare const rebaseGlob: (glob: string, cwd: string, base: string) => readonly string[];
|
|
44
27
|
/**
|
|
45
28
|
* A set of files paperlint lints: an own block's globs and the exceptions that block makes. A file is
|
|
46
29
|
* in it when it matches one of `files` and none of `ignores`.
|
|
@@ -81,5 +64,5 @@ export declare function ruleOwners(own: readonly ConfigBlock[]): Map<string, rea
|
|
|
81
64
|
* of this config registers (the LaTeX block is absent when its parser did not load) gets no block:
|
|
82
65
|
* it has no file to reach in this run, and naming it to ESLint would only crash.
|
|
83
66
|
*/
|
|
84
|
-
export declare function narrowToOwners(block: RuleBlock, owners: ReadonlyMap<string, readonly OwnedScope[]
|
|
67
|
+
export declare function narrowToOwners(block: RuleBlock, owners: ReadonlyMap<string, readonly OwnedScope[]>, papers?: PaperScope): ScopedBlock[];
|
|
85
68
|
//# sourceMappingURL=paper-files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paper-files.d.ts","sourceRoot":"","sources":["../src/paper-files.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paper-files.d.ts","sourceRoot":"","sources":["../src/paper-files.ts"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;CAAE,GACxB;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC,CAAC;AAEN,eAAO,MAAM,SAAS,EAAE,UAA4B,CAAC;AAUrD,sFAAsF;AACtF,eAAO,MAAM,WAAW,GACtB,MAAM,SAAS,MAAM,EAAE,EACvB,KAAK,MAAM,KACV,UAID,CAAC;AAEH,iGAAiG;AACjG,eAAO,MAAM,UAAU,GACrB,OAAO,UAAU,EACjB,MAAM,MAAM,KACX,SAAS,MAAM,EAGiD,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GACrB,MAAM,MAAM,EACZ,KAAK,MAAM,EACX,MAAM,MAAM,KACX,SAAS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|
@@ -1,3 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE FILES PAPERLINT OWNS — read off its own config, and made the only thing ESLint may reach.
|
|
3
|
+
*
|
|
4
|
+
* paperlint's blocks name the files they lint (`PIPELINE-STATUS.md`, `paper.tex`, `reviews/*.md`,
|
|
5
|
+
* …). That list is the whole scope of `paperlint lint`, and this module turns it
|
|
6
|
+
* into two things ESLint understands:
|
|
7
|
+
*
|
|
8
|
+
* 1. **A global ignore of everything else** (`scopeToOwned`). Handing ESLint a directory is not
|
|
9
|
+
* enough: its built-in defaults lint every JavaScript file it finds, whatever our config says.
|
|
10
|
+
* Measured on a consumer project with vendored code under a paper's `repro/` folder: 1,877
|
|
11
|
+
* files, 74 errors ("'return' outside of function", "Definition for rule … was not found"),
|
|
12
|
+
* zero of them on a paper file, exit 1 — and nothing in the settings could turn it off. With
|
|
13
|
+
* the ignore, a stray script under the papers directory is never enumerated at all, and a file
|
|
14
|
+
* named on the command line can be asked about (`ESLint#isPathIgnored`) with ESLint's own
|
|
15
|
+
* matcher instead of a hand-written one.
|
|
16
|
+
*
|
|
17
|
+
* 2. **Each rule scoped to the files it was written for** (`ruleOwners` + `narrowToOwners`).
|
|
18
|
+
* One plugin NAME is bound to different plugin objects in different blocks: `paper` holds
|
|
19
|
+
* `stages`/`source`/`author-list` beside `PIPELINE-STATUS.md` and `typography` beside
|
|
20
|
+
* `paper.tex`. So a consumer block that named `paper/source`
|
|
21
|
+
* for every file under the papers directory reached `paper.tex`, where `paper` has no `source`
|
|
22
|
+
* — and ESLint threw `Could not find "source" in plugin "paper"` from inside `lintFiles`,
|
|
23
|
+
* after paperlint's own validation had (correctly) accepted the id. A block is therefore split
|
|
24
|
+
* per owner and its `files` ANDed with the owner's (ESLint's nested-array form), so a rule can
|
|
25
|
+
* only land where its plugin is registered.
|
|
26
|
+
*
|
|
27
|
+
* Both read ONE definition of "the files paperlint lints": `ownedScopes`, each own block's `files`
|
|
28
|
+
* together with its `ignores`. The globs alone are not that definition. The sibling-card block
|
|
29
|
+
* claims every markdown file under `siblings/` EXCEPT the index, and a rule whose plugin is
|
|
30
|
+
* registered for every file (`pdf`) used to keep the consumer block's `files` as they were — so a
|
|
31
|
+
* venue preset's rules reached `siblings/README.md`, a block with no `language` matched it, and
|
|
32
|
+
* ESLint parsed the markdown as JavaScript (#101). Now every generated block narrows to scopes,
|
|
33
|
+
* exceptions included, and a plugin registered everywhere owns exactly what paperlint lints.
|
|
34
|
+
*
|
|
35
|
+
* ESLint's semantics that this leans on, each measured against ESLint 10 before writing it:
|
|
36
|
+
* - a global-ignore pattern that matches a DIRECTORY hides everything inside it, so directories
|
|
37
|
+
* must be un-ignored (`!` + a pattern ending in a slash) before owned files can be;
|
|
38
|
+
* - that un-ignores `node_modules/` and `.git/` too — ESLint's own defaults — so they are
|
|
39
|
+
* re-ignored after, or a `paper.tex` inside a dependency would be linted;
|
|
40
|
+
* - later global-ignore patterns win, across blocks, in config order;
|
|
41
|
+
* - `files: [["a", "b"]]` matches a file only when BOTH patterns match.
|
|
42
|
+
*/
|
|
43
|
+
import { relative, sep } from "node:path";
|
|
44
|
+
export const ANY_PAPER = { kind: "any" };
|
|
45
|
+
/** The characters a glob reads as syntax, escaped so a folder's name matches only itself. Pure. */
|
|
46
|
+
const literalGlob = (path) => path.replace(/[\\*?[\]{}()!+@]/gu, "\\$&");
|
|
47
|
+
/** `to` relative to `from`, `/`-separated. Pure. */
|
|
48
|
+
const posixRelative = (from, to) => relative(from, to).split(sep).join("/");
|
|
49
|
+
/** The papers `dirs` under ESLint's `cwd`: the scope `paperlint lint` lints. Pure. */
|
|
50
|
+
export const papersScope = (dirs, cwd) => ({
|
|
51
|
+
kind: "papers",
|
|
52
|
+
cwd,
|
|
53
|
+
prefixes: dirs.map((d) => literalGlob(posixRelative(cwd, d))),
|
|
54
|
+
});
|
|
55
|
+
/** A glob of a paper's own file (`paper.tex`, `reviews/*.md`) in each paper of `scope`. Pure. */
|
|
56
|
+
export const paperFiles = (scope, glob) => scope.kind === "any"
|
|
57
|
+
? [`**/${glob}`]
|
|
58
|
+
: scope.prefixes.map((p) => (p === "" ? glob : `${p}/${glob}`));
|
|
59
|
+
/**
|
|
60
|
+
* A glob relative to `cwd`, as the block whose `basePath` is `base` must write it — ESLint reads a
|
|
61
|
+
* block's patterns from its `basePath`, and a paper's own settings carry the paper's folder. None
|
|
62
|
+
* when the glob names files outside `base`: that block can never reach them. A glob that starts with
|
|
63
|
+
* `**` matches at any depth and is kept as it is. Pure.
|
|
64
|
+
*/
|
|
65
|
+
export const rebaseGlob = (glob, cwd, base) => {
|
|
66
|
+
if (glob.startsWith("**"))
|
|
67
|
+
return [glob];
|
|
68
|
+
const up = posixRelative(base, cwd);
|
|
69
|
+
if (!up.startsWith(".."))
|
|
70
|
+
return [up === "" ? glob : `${literalGlob(up)}/${glob}`];
|
|
71
|
+
const down = `${literalGlob(posixRelative(cwd, base))}/`;
|
|
72
|
+
return glob.startsWith(down) ? [glob.slice(down.length)] : [];
|
|
73
|
+
};
|
|
1
74
|
/** A block's `files`, the string globs only. */
|
|
2
75
|
const globsOf = (files) => files.filter((f) => typeof f === "string");
|
|
3
76
|
const stringsOf = (xs) => (xs ?? []).filter((x) => typeof x === "string");
|
|
@@ -68,7 +141,7 @@ export function ruleOwners(own) {
|
|
|
68
141
|
* of this config registers (the LaTeX block is absent when its parser did not load) gets no block:
|
|
69
142
|
* it has no file to reach in this run, and naming it to ESLint would only crash.
|
|
70
143
|
*/
|
|
71
|
-
export function narrowToOwners(block, owners) {
|
|
144
|
+
export function narrowToOwners(block, owners, papers = ANY_PAPER) {
|
|
72
145
|
// Keyed by the owner's JSON, so rules with equal owners share one group of blocks.
|
|
73
146
|
const groups = new Map();
|
|
74
147
|
const ownerOf = new Map();
|
|
@@ -80,19 +153,38 @@ export function narrowToOwners(block, owners) {
|
|
|
80
153
|
groups.set(key, { ...groups.get(key), [id]: entry });
|
|
81
154
|
ownerOf.set(key, owner);
|
|
82
155
|
}
|
|
83
|
-
return [...ownerOf].flatMap(([key, owner]) => owner.
|
|
156
|
+
return [...ownerOf].flatMap(([key, owner]) => owner.flatMap((scope) => within(block, rebased(scope, papers, block.basePath), {
|
|
157
|
+
...groups.get(key),
|
|
158
|
+
})));
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* `scope` as the block with `basePath` `base` must write it. The scope's globs are relative to ESLint's
|
|
162
|
+
* `cwd`; a paper's own settings are read from the paper's folder (#582).
|
|
163
|
+
*/
|
|
164
|
+
function rebased(scope, papers, base) {
|
|
165
|
+
if (papers.kind === "any")
|
|
166
|
+
return scope;
|
|
167
|
+
const onto = (globs) => globs.flatMap((g) => rebaseGlob(g, papers.cwd, base));
|
|
168
|
+
return { files: onto(scope.files), ignores: onto(scope.ignores) };
|
|
84
169
|
}
|
|
85
|
-
/**
|
|
170
|
+
/**
|
|
171
|
+
* `block`'s rules over the files both it and `scope` claim, minus both sets of exceptions; none when
|
|
172
|
+
* the scope claims no file the block can reach (ESLint refuses an empty `files`).
|
|
173
|
+
*/
|
|
86
174
|
function within(block, scope, rules) {
|
|
175
|
+
if (scope.files.length === 0)
|
|
176
|
+
return [];
|
|
87
177
|
const files = block.files
|
|
88
178
|
? block.files.flatMap((f) => scope.files.map((o) => [f, o]))
|
|
89
179
|
: scope.files;
|
|
90
180
|
const ignores = [...(block.ignores ?? []), ...scope.ignores];
|
|
91
|
-
return
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
181
|
+
return [
|
|
182
|
+
{
|
|
183
|
+
basePath: block.basePath,
|
|
184
|
+
files,
|
|
185
|
+
...(ignores.length ? { ignores } : {}),
|
|
186
|
+
rules,
|
|
187
|
+
},
|
|
188
|
+
];
|
|
97
189
|
}
|
|
98
190
|
//# sourceMappingURL=paper-files.js.map
|
package/dist/paper-files.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paper-files.js","sourceRoot":"","sources":["../src/paper-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import { type Parsed, type RuleEntry } from "./rules-config.ts";
|
|
|
4
4
|
import { type PaperTalk } from "./domain/talk.ts";
|
|
5
5
|
import { type Author, type PaperSubmission } from "./domain/submission.ts";
|
|
6
6
|
import { type Cycles } from "./domain/cycle.ts";
|
|
7
|
+
import { type PaperArtifact } from "./domain/artifact.ts";
|
|
7
8
|
/** What one paper declares. Every absent field is null. */
|
|
8
9
|
export interface PaperSettings {
|
|
9
10
|
/** The venue preset the paper is judged against: `paperlint:<name>` or a relative path. */
|
|
@@ -40,6 +41,8 @@ export interface PaperSettings {
|
|
|
40
41
|
* attempt's — derived, never written beside it. Never the root's.
|
|
41
42
|
*/
|
|
42
43
|
readonly cycles: Cycles | null;
|
|
44
|
+
/** Where the paper's reproduction artifact is and what the paper promises it holds (`artifact/contents`); null when absent. Never the root's. */
|
|
45
|
+
readonly artifact: PaperArtifact | null;
|
|
43
46
|
}
|
|
44
47
|
/** Why a paper's settings cannot be read. */
|
|
45
48
|
export type SettingsProblem = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paper-settings.d.ts","sourceRoot":"","sources":["../src/paper-settings.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,eAAe,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAKL,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"paper-settings.d.ts","sourceRoot":"","sources":["../src/paper-settings.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,oBAAoB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GS_KEYS):
|
|
5
5
|
*
|
|
6
6
|
* paperlint.json the project (optional): papersDir, rules, defaults
|
|
7
|
-
* <paper>/paperlint.json this paper: { extends, kind, pdf, rules, identity, talk, submission, authors, fields } —
|
|
7
|
+
* <paper>/paperlint.json this paper: { extends, kind, pdf, rules, identity, talk, submission, authors, fields, artifact } —
|
|
8
8
|
* or `cycles`, from whose current attempt extends, kind and submission
|
|
9
9
|
* are DERIVED (src/domain/cycle.ts); the two forms do not mix
|
|
10
10
|
* a venue preset `paperlint:<name>` (shipped) or `./x.jsonc` (src/presets.ts)
|
|
@@ -26,6 +26,7 @@ import { messageOf } from "./domain/text.js";
|
|
|
26
26
|
import { parsePaperTalk } from "./domain/talk.js";
|
|
27
27
|
import { parsePaperAuthors, parsePaperSubmission, } from "./domain/submission.js";
|
|
28
28
|
import { cycleProblemText, cyclesOf, parseCycles, venueCycleOf, } from "./domain/cycle.js";
|
|
29
|
+
import { parsePaperArtifact } from "./domain/artifact.js";
|
|
29
30
|
const KNOWN = Object.keys(SETTINGS_KEYS);
|
|
30
31
|
const STRING_FIELDS = ["extends", "kind", "pdf"];
|
|
31
32
|
const isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
@@ -150,11 +151,15 @@ export function parsePaperSettings(json) {
|
|
|
150
151
|
const cycles = cyclesField(json);
|
|
151
152
|
if (!cycles.ok)
|
|
152
153
|
return cycles;
|
|
154
|
+
const artifact = parsePaperArtifact(json["artifact"]);
|
|
155
|
+
if (!artifact.ok)
|
|
156
|
+
return artifact;
|
|
153
157
|
const flat = {
|
|
154
158
|
...fields.value,
|
|
155
159
|
...rest.value,
|
|
156
160
|
identity: identity.value,
|
|
157
161
|
cycles: cycles.value,
|
|
162
|
+
artifact: artifact.value,
|
|
158
163
|
};
|
|
159
164
|
return ok(cycles.value === null ? flat : { ...flat, ...derived(cycles.value) });
|
|
160
165
|
}
|
|
@@ -218,31 +223,29 @@ const NO_DEFAULTS = {
|
|
|
218
223
|
pdf: null,
|
|
219
224
|
identity: null,
|
|
220
225
|
};
|
|
226
|
+
/** A paper that declares nothing. */
|
|
227
|
+
const NO_SETTINGS = {
|
|
228
|
+
...NO_DEFAULTS,
|
|
229
|
+
rules: null,
|
|
230
|
+
talk: null,
|
|
231
|
+
submission: null,
|
|
232
|
+
authors: null,
|
|
233
|
+
fields: null,
|
|
234
|
+
cycles: null,
|
|
235
|
+
artifact: null,
|
|
236
|
+
};
|
|
221
237
|
/** Both lists, joined without repeats; null when neither side has one. */
|
|
222
238
|
const joined = (a, b) => a === null && b === null ? null : [...new Set([...(a ?? []), ...(b ?? [])])];
|
|
223
239
|
/** The paper's own values win; each absent one falls back to the root's. */
|
|
224
240
|
function merge(root, paper) {
|
|
225
241
|
const r = root ?? NO_DEFAULTS;
|
|
226
|
-
const p = paper ??
|
|
227
|
-
...NO_DEFAULTS,
|
|
228
|
-
rules: null,
|
|
229
|
-
talk: null,
|
|
230
|
-
submission: null,
|
|
231
|
-
authors: null,
|
|
232
|
-
fields: null,
|
|
233
|
-
cycles: null,
|
|
234
|
-
};
|
|
242
|
+
const p = paper ?? NO_SETTINGS;
|
|
235
243
|
const merged = {
|
|
244
|
+
...p,
|
|
236
245
|
extends: p.extends ?? r.extends,
|
|
237
246
|
kind: p.kind ?? r.kind,
|
|
238
247
|
pdf: p.pdf ?? r.pdf,
|
|
239
|
-
rules: p.rules,
|
|
240
248
|
identity: joined(r.identity, p.identity),
|
|
241
|
-
talk: p.talk,
|
|
242
|
-
submission: p.submission,
|
|
243
|
-
authors: p.authors,
|
|
244
|
-
fields: p.fields,
|
|
245
|
-
cycles: p.cycles,
|
|
246
249
|
};
|
|
247
250
|
return paper === null && Object.values(merged).every((v) => v === null)
|
|
248
251
|
? null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paper-settings.js","sourceRoot":"","sources":["../src/paper-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,OAAO,EA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CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC;QACrE,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,MAAM,CAAC;AACb,CAAC;AAED,2FAA2F;AAE3F;;;;GAIG;AACH,MAAM,UAAU,UAAU,CACxB,QAAgB,EAChB,QAAuB,EACvB,OAA4B;IAE5B,IAAI,QAAQ,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC1D,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,YAAY,CAAC;IACzD,OAAO,gBAAgB,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every file under a folder — what the artifact rules ask of a paper's artifact folder, to judge its
|
|
3
|
+
* top level and its promises' globs over the same list a committed `files` list gives.
|
|
4
|
+
*/
|
|
5
|
+
import type { AbsolutePath } from "../domain/paths.ts";
|
|
6
|
+
/**
|
|
7
|
+
* The regular files under `dir`, at any depth, as paths relative to it (`/`-separated), sorted;
|
|
8
|
+
* null when `dir` is not a directory.
|
|
9
|
+
*/
|
|
10
|
+
export type ListTree = (dir: AbsolutePath) => readonly string[] | null;
|
|
11
|
+
//# sourceMappingURL=list-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-tree.d.ts","sourceRoot":"","sources":["../../src/ports/list-tree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,YAAY,KAAK,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-tree.js","sourceRoot":"","sources":["../../src/ports/list-tree.ts"],"names":[],"mappings":""}
|
package/docs/configuration.md
CHANGED
|
@@ -103,7 +103,7 @@ refused by name. `node_modules/`, `.git/` and `<papers>/.template/` are skipped.
|
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
The same keys as the root file, minus the project-only ones (`papersDir`, `structure` and the
|
|
106
|
-
skills' keys), which are refused here by name, plus `talk`, `submission`, `authors` and `
|
|
106
|
+
skills' keys), which are refused here by name, plus `talk`, `submission`, `authors`, `cycles` and `artifact`, which only a paper has. **It merges over the root file:** its `extends`,
|
|
107
107
|
`kind` and `pdf` win; one it does not set comes from the root.
|
|
108
108
|
|
|
109
109
|
| key | what it is |
|
|
@@ -116,6 +116,7 @@ skills' keys), which are refused here by name, plus `talk`, `submission`, `autho
|
|
|
116
116
|
| `submission` | which submission on the venue's portal is this paper's, `{ "id": 7 }` — read by [`paperlint submission`](submission.md), with the preset's `portal`. Only here: the root file refuses it |
|
|
117
117
|
| `authors` | the authors as the venue's portal should record them, in the paper's order: `[{ "name": "…", "email": "…", "affiliation": "…" }]` (`affiliation` optional) — read by [`paperlint submission new`](submission.md), never guessed. Only here: the root file refuses it |
|
|
118
118
|
| `cycles` | the paper's attempts at venues, one entry per attempt, oldest first — see [The paper's cycles](#the-papers-cycles) below. With it, `extends`, `kind` and `submission` are the current attempt's and may not be written beside it. Only here: the root file refuses it |
|
|
119
|
+
| `artifact` | the reproduction artifact: `dir` (its folder) or `files` (a committed list of its paths), `required` (top-level names, any extension) and `promises` (label → glob) — [`artifact/*`](rules/artifact/required-files.md). Only here: the root file refuses it |
|
|
119
120
|
| `rules` | rule overrides for this paper alone — `{ "<rule>": "<severity>" }`, or blocks with globs relative to the paper |
|
|
120
121
|
| `$comment` | a note for humans; ignored |
|
|
121
122
|
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# artifact/promised
|
|
2
|
+
|
|
3
|
+
**Level:** error · **Reads:** the paper's `paperlint.json` (`artifact`), then the artifact's folder
|
|
4
|
+
(`artifact.dir`) or its committed list of paths (`artifact.files`) · **Reported on:** the first line
|
|
5
|
+
of the paper's `PIPELINE-STATUS.md`
|
|
6
|
+
|
|
7
|
+
## What it catches
|
|
8
|
+
|
|
9
|
+
A promise in the paper's `artifact.promises` whose glob matches no path of the artifact. A promise
|
|
10
|
+
is one thing the paper says the artifact contains — its Data Availability sentence, written once as
|
|
11
|
+
a label and a glob relative to the artifact's root (`"prompts": "**/prompts/*.md"`).
|
|
12
|
+
|
|
13
|
+
It also says when it cannot look: the folder `artifact.dir` does not exist, or the list
|
|
14
|
+
`artifact.files` does not exist or names no file.
|
|
15
|
+
|
|
16
|
+
## Why
|
|
17
|
+
|
|
18
|
+
"The prompts and the raw runs are in the artifact" is checked by a reviewer who opens it, after the
|
|
19
|
+
paper is submitted. The glob makes the same check on every lint, before.
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
Failing — the paper promises raw runs the artifact does not hold:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"artifact": {
|
|
28
|
+
"dir": "repro",
|
|
29
|
+
"promises": { "prompts": "**/prompts/*.md", "runs": "runs/*.jsonl" }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
papers/my-paper/PIPELINE-STATUS.md
|
|
36
|
+
1:1 error the artifact promise "runs" (runs/*.jsonl) matches no path of the artifact (repro):
|
|
37
|
+
the paper says the artifact holds it — add the files, or correct the glob in
|
|
38
|
+
"artifact.promises" artifact/promised
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Passing: each glob matches at least one file; or the paper declares no `artifact`, or an
|
|
42
|
+
`artifact` without `promises`.
|
|
43
|
+
|
|
44
|
+
## Options / preset fields
|
|
45
|
+
|
|
46
|
+
No rule options. It reads the paper's own `artifact` — `dir` or `files`, as
|
|
47
|
+
[`artifact/required-files`](required-files.md) describes them, and `promises`: label → glob. A glob
|
|
48
|
+
is matched with Node's `path.matchesGlob` against every file of the folder (or every line of the
|
|
49
|
+
list), so the folder and its list give the same answer; `*` and `**` do not match a dot-file or a
|
|
50
|
+
dot-folder unless the glob names the dot (`.github/**`). A single wrapper folder around every
|
|
51
|
+
path is looked through, as for `required`.
|
|
52
|
+
|
|
53
|
+
## What it does not check
|
|
54
|
+
|
|
55
|
+
- The hosted copy a reviewer downloads: only the folder or the list in the repository (#98, #415).
|
|
56
|
+
- Whether the files are current with the paper's text, or hold what their names say.
|
|
57
|
+
- Whether the promise list is complete: a sentence of the paper with no promise is not seen.
|
|
58
|
+
Calibrating against a venue's badged artifacts is #492.
|
|
59
|
+
- The paper's own «(artifact)» markers, and a DOI or archival copy.
|
|
60
|
+
|
|
61
|
+
## How to fix
|
|
62
|
+
|
|
63
|
+
Add the files to the artifact, or correct the glob. If the paper no longer makes the promise,
|
|
64
|
+
remove it from `artifact.promises` in the same change as the sentence.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# artifact/required-files
|
|
2
|
+
|
|
3
|
+
**Level:** error · **Reads:** the paper's `paperlint.json` (`artifact`), then the artifact's folder
|
|
4
|
+
(`artifact.dir`) or its committed list of paths (`artifact.files`) · **Reported on:** the first line
|
|
5
|
+
of the paper's `PIPELINE-STATUS.md`
|
|
6
|
+
|
|
7
|
+
## What it catches
|
|
8
|
+
|
|
9
|
+
A name the paper's `artifact.required` lists that is not at the top level of the artifact. A name is
|
|
10
|
+
matched without its extension and case: `README` is answered by `README.md`, `readme.txt` or
|
|
11
|
+
`README`; a `README.md` in a subfolder is not at the top level and does not count.
|
|
12
|
+
|
|
13
|
+
It also says when it cannot look: the folder `artifact.dir` does not exist, or the list
|
|
14
|
+
`artifact.files` does not exist or names no file.
|
|
15
|
+
|
|
16
|
+
## Why
|
|
17
|
+
|
|
18
|
+
An artifact-evaluation committee opens the top of the artifact first, and its instructions ask for
|
|
19
|
+
files there (a README with setup and usage, a LICENSE). The paper names what its artifact must
|
|
20
|
+
hold once; the rule keeps holding it as the artifact changes.
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
Failing — the artifact has a README and no LICENSE:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{ "artifact": { "dir": "repro", "required": ["README", "LICENSE"] } }
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
papers/my-paper/PIPELINE-STATUS.md
|
|
32
|
+
1:1 error the artifact (repro) has no top-level LICENSE — any extension counts (LICENSE.md,
|
|
33
|
+
LICENSE.txt, LICENSE); "artifact.required" in paperlint.json asks for one
|
|
34
|
+
artifact/required-files
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Passing: `repro/README.md` and `repro/LICENSE` are there; or the paper declares no `artifact`, or
|
|
38
|
+
an `artifact` without `required` — the rule then has nothing to judge.
|
|
39
|
+
|
|
40
|
+
## Options / preset fields
|
|
41
|
+
|
|
42
|
+
No rule options. It reads only the paper's own `artifact` ([configuration](../../configuration.md#a-papers-paperlintjson)).
|
|
43
|
+
`dir` is the artifact's folder, relative to the paper (usually `repro`); `files`, instead, is a
|
|
44
|
+
committed text file listing the artifact's paths one per line, as `zipinfo -1` or `find . -type f`
|
|
45
|
+
print them, for a bundle that is not committed; `required` lists the top-level names without an
|
|
46
|
+
extension (`["README", "LICENSE"]`).
|
|
47
|
+
|
|
48
|
+
Exactly one of `dir` and `files`. In a list, blank lines and folder entries (`data/`) are skipped
|
|
49
|
+
and a leading `./` is dropped. A single wrapper folder is looked through: when every path sits in
|
|
50
|
+
one folder and no file stands beside it (`repo-main/…` from GitHub's Download ZIP, Zenodo's and
|
|
51
|
+
OSF's archives), the top level is that folder's.
|
|
52
|
+
|
|
53
|
+
## What it does not check
|
|
54
|
+
|
|
55
|
+
- The hosted copy a reviewer downloads (an anonymous link, OSF, Zenodo): only the folder or the list
|
|
56
|
+
in the repository. Comparing the two is #98 and #415.
|
|
57
|
+
- Whether the files are current with the paper's text, or what the README says.
|
|
58
|
+
- Whether `required` is complete: it holds what the paper declares, and no venue's list is built in.
|
|
59
|
+
Calibrating such a list on a venue's badged artifacts is #492.
|
|
60
|
+
- The paper's own «(artifact)» markers, and a DOI or archival copy.
|
|
61
|
+
|
|
62
|
+
## How to fix
|
|
63
|
+
|
|
64
|
+
Add the file to the artifact's top level, or regenerate the list after adding it to the bundle.
|
|
65
|
+
If the paper no longer needs the name, remove it from `artifact.required`.
|
package/docs/rules.md
CHANGED
|
@@ -20,6 +20,8 @@ reads and when it fails. Errors fail `paperlint lint`; warnings print and do not
|
|
|
20
20
|
| [`versions/layout`](rules/versions/layout.md) | error | `versions/`, `versions/lock.json` → `paperlint.json` (`cycles`) | with `cycles` declared: an entry of `versions/` that is not `lock.json` or a folder named by a cycle id, a file in a cycle's folder that is not `<stage>.pdf`/`.tex` (`submitted`, `camera-ready`, `arxiv`; approved has a .tex only) or `changes.yaml`, a PDF without its source (unless the lock records it lost), a PDF sent from a cycle still `porting`, or a frozen file that does not match `versions/lock.json`; reported on `PIPELINE-STATUS.md` — [page](rules/versions/layout.md) |
|
|
21
21
|
| [`paper/folder-venue-leftover`](rules/paper/folder-venue-leftover.md) | warn | the folder name → `paperlint.json` | the paper's folder is named after another shipped venue than the one it extends (`papers/aisec-2026/` for a paper now set for AIDC); reported on `PIPELINE-STATUS.md` — [page](rules/paper/folder-venue-leftover.md) |
|
|
22
22
|
| [`paper/edition-over`](rules/paper/edition-over.md) | warn | `paperlint.json` → the venue preset, and the clock | every deadline the paper's edition preset records has passed: the edition is over; names the newer editions of the series paperlint ships — [page](rules/paper/edition-over.md) |
|
|
23
|
+
| [`artifact/required-files`](rules/artifact/required-files.md) | error; silent without `artifact.required` | `paperlint.json` (`artifact`) → the artifact's folder or its committed list of paths | a name the paper requires at the artifact's top level (`README`, `LICENSE`; any extension) is not there, or the folder or list is missing — [page](rules/artifact/required-files.md) |
|
|
24
|
+
| [`artifact/promised`](rules/artifact/promised.md) | error; silent without `artifact.promises` | `paperlint.json` (`artifact`) → the artifact's folder or its committed list of paths | a promise of the paper (a label and a glob) matches no path of the artifact, or the folder or list is missing — [page](rules/artifact/promised.md) |
|
|
23
25
|
| [`paper/allowed-files-only`](rules/paper/allowed-files-only.md) | error | the paper folder's root listing → `paperlint.json` | a file or folder at the paper's root is not part of the layout (`PLAN.md`, `archive/`, a stray PDF); reported on `PIPELINE-STATUS.md`, once per entry, with where it goes; `extra/` takes anything — [page](rules/paper/allowed-files-only.md) |
|
|
24
26
|
| [`repro/allowed-files-only`](rules/repro/allowed-files-only.md) | error | the listing of the paper's `repro/` | an entry at the top of `repro/` is not `README.md`, `studies.json`, `.gitignore`, `tools/`, `data/` or a study folder named `<id>-<slug>` (or, in a paper without the registry, `<slug>-YYYY-MM-DD`), or a study folder has no `README.md`; reported on `PIPELINE-STATUS.md`, once per entry, with where it goes by kind (a script → `repro/tools/`, data → `repro/data/`, a note → its study or `research/`) — [page](rules/repro/allowed-files-only.md) |
|
|
25
27
|
| [`repro/study-registered`](rules/repro/study-registered.md) | error | the listing of the paper's `repro/`, `repro/studies.json`, `repro/README.md`, each study's `plan.json` | a study folder with no row in `repro/studies.json`, a row whose folder is missing or not `<id>-<slug>`, a bad or repeated id, a title over 8 words, `done` without a result and an existing result file, `superseded` without an existing successor, a row naming a measurement the registry does not declare, a measurement with no study or an unknown requirement, a headline measurement not approved by the author, a plan that is missing, malformed or — once the study runs — unfilled, a headline study that has run without the author's check in its plan, or the index in `repro/README.md` out of sync with the registry; `paperlint studies new` and `paperlint studies index` write both — [page](rules/repro/study-registered.md) |
|
package/lib/paper-config.ts
CHANGED
|
@@ -147,6 +147,8 @@ export const SETTINGS_KEYS: Readonly<Record<string, string>> = Object.freeze({
|
|
|
147
147
|
'the paper\'s answers to the venue\'s own form fields, keyed as the preset\'s "submission_fields" names them: { "topics": ["<an option>"], "paper_type": "<one option>", "pc_conflicts": { "<pc email>": "<conflict type>" }, … } — checked against those fields, every required one filled, then sent by paperlint submission new and update. Set only in a paper\'s own paperlint.json; in the root paperlint.json it is an error',
|
|
148
148
|
cycles:
|
|
149
149
|
"the paper's attempts at venues, oldest first: [{ id, venue, kind, opened, phase?, deadlines, submission?, outcome }] — extends, kind and submission are then the current attempt's, and the cycle/ rules judge the record. Set only in a paper's own paperlint.json; in the root paperlint.json it is an error",
|
|
150
|
+
artifact:
|
|
151
|
+
'the paper\'s reproduction artifact and what it must hold: { "dir": "<folder>" or "files": "<committed list of its paths>", "required"?: ["README", "LICENSE"], "promises"?: { "<label>": "<glob>" } } — artifact/required-files, artifact/promised. Set only in a paper\'s own paperlint.json; in the root paperlint.json it is an error',
|
|
150
152
|
scripts: "how skill prose names the scripts — consumer.mjs",
|
|
151
153
|
timezone: "the zone deadline anchors are written in — consumer.mjs",
|
|
152
154
|
contactEmail: "the polite-pool address for citation lookups — consumer.mjs",
|
|
@@ -162,6 +164,7 @@ export const PAPER_ONLY_KEYS: readonly string[] = Object.freeze([
|
|
|
162
164
|
"authors",
|
|
163
165
|
"fields",
|
|
164
166
|
"cycles",
|
|
167
|
+
"artifact",
|
|
165
168
|
]);
|
|
166
169
|
|
|
167
170
|
/** The keys that only mean something for the whole project: refused in a paper's `paperlint.json`. */
|