paperlint 4.2.0 → 5.0.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/CLAUDE.md +2 -2
- package/README.md +15 -4
- package/action.harness.mjs +54 -36
- package/action.yml +12 -27
- package/dist/adapters/latex/includes.d.ts +5 -1
- package/dist/adapters/latex/includes.d.ts.map +1 -1
- package/dist/adapters/latex/includes.js +8 -2
- package/dist/adapters/latex/includes.js.map +1 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +7 -3
- package/dist/build.js.map +1 -1
- package/dist/cli.d.ts +2 -8
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +67 -37
- package/dist/cli.js.map +1 -1
- package/dist/domain/paper-source.js +2 -2
- package/dist/eslint-rules/latex-language.d.ts +5 -1
- package/dist/eslint-rules/latex-language.d.ts.map +1 -1
- package/dist/eslint-rules/latex-language.js +6 -3
- package/dist/eslint-rules/latex-language.js.map +1 -1
- package/dist/eslint-rules/paper-context.d.ts +20 -0
- package/dist/eslint-rules/paper-context.d.ts.map +1 -0
- package/dist/eslint-rules/paper-context.js +44 -0
- package/dist/eslint-rules/paper-context.js.map +1 -0
- package/dist/eslint-rules/paper-typography.d.ts +1 -1
- package/dist/eslint-rules/paper-typography.d.ts.map +1 -1
- package/dist/eslint-rules/paper-typography.js +32 -18
- package/dist/eslint-rules/paper-typography.js.map +1 -1
- package/dist/eslint-rules/tex-build.d.ts.map +1 -1
- package/dist/eslint-rules/tex-build.js +7 -1
- package/dist/eslint-rules/tex-build.js.map +1 -1
- package/dist/init.d.ts +4 -19
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +24 -29
- package/dist/init.js.map +1 -1
- package/dist/package-dirs.d.ts +2 -0
- package/dist/package-dirs.d.ts.map +1 -1
- package/dist/package-dirs.js +8 -0
- package/dist/package-dirs.js.map +1 -1
- package/dist/paper-files.d.ts +2 -2
- package/dist/paper-includes.d.ts +17 -0
- package/dist/paper-includes.d.ts.map +1 -0
- package/dist/paper-includes.js +51 -0
- package/dist/paper-includes.js.map +1 -0
- package/dist/rules-config.d.ts +1 -0
- package/dist/rules-config.d.ts.map +1 -1
- package/dist/rules-config.js.map +1 -1
- package/dist/structure.js +1 -1
- package/dist/structure.js.map +1 -1
- package/dist/tex-paper.d.ts +17 -3
- package/dist/tex-paper.d.ts.map +1 -1
- package/dist/tex-paper.js +36 -38
- package/dist/tex-paper.js.map +1 -1
- package/docs/configuration.md +5 -4
- package/docs/install.md +8 -8
- package/docs/prior-art/paper-folder-scaffolding.md +4 -7
- package/docs/rules.md +15 -11
- package/eslint-rules/latex-language.ts +10 -4
- package/eslint-rules/paper-context.test.ts +47 -0
- package/eslint-rules/paper-context.ts +57 -0
- package/eslint-rules/paper-typography.ts +67 -23
- package/eslint-rules/tex-build.ts +8 -1
- package/fixtures/real-markdown-paper/baseline.json +1 -2
- package/package.json +1 -1
- package/scripts/check.ts +2 -2
- package/scripts/eslint-report-guard.mjs +5 -2
- package/scripts/harness-api.frozen.json +0 -1
- package/skills/paper-pipeline/references/pipeline-status-template.md +2 -16
- package/src/adapters/latex/includes.ts +10 -2
- package/src/adapters/latex/index.test.ts +8 -0
- package/src/build.harness.mjs +4 -2
- package/src/build.test.ts +18 -1
- package/src/build.ts +7 -3
- package/src/cli.harness.mjs +22 -54
- package/src/cli.test.ts +2 -18
- package/src/cli.ts +78 -42
- package/src/domain/paper-source.ts +2 -2
- package/src/init.test.ts +33 -13
- package/src/init.ts +25 -48
- package/src/linted-set.test.ts +11 -1
- package/src/new-paper.harness.mjs +1 -5
- package/src/package-dirs.ts +9 -0
- package/src/paper-files.ts +2 -2
- package/src/paper-includes.test.ts +161 -0
- package/src/paper-includes.ts +77 -0
- package/src/rule-cases.test.ts +0 -30
- package/src/rule-docs.test.ts +0 -1
- package/src/rules-config.ts +1 -0
- package/src/structure.harness.ts +1 -3
- package/src/structure.ts +1 -1
- package/src/tex-paper.test.ts +78 -61
- package/src/tex-paper.ts +57 -48
- package/src/tex-venue-rules.test.ts +1 -1
- package/templates/paper/PIPELINE-STATUS.md +0 -4
- package/dist/action-ref.d.ts +0 -12
- package/dist/action-ref.d.ts.map +0 -1
- package/dist/action-ref.js +0 -16
- package/dist/action-ref.js.map +0 -1
- package/dist/eslint-rules/paper-research-question.d.ts +0 -31
- package/dist/eslint-rules/paper-research-question.d.ts.map +0 -1
- package/dist/eslint-rules/paper-research-question.js +0 -188
- package/dist/eslint-rules/paper-research-question.js.map +0 -1
- package/docs/rules/tex/missing-input.md +0 -58
- package/eslint-rules/paper-research-question.harness.mjs +0 -212
- package/eslint-rules/paper-research-question.ts +0 -199
- package/fixtures/paper-research-question/comment-only/PIPELINE-STATUS.md +0 -9
- package/fixtures/paper-research-question/comment-only/paper.tex +0 -7
- package/fixtures/paper-research-question/declared-not-in-paper/PIPELINE-STATUS.md +0 -10
- package/fixtures/paper-research-question/declared-not-in-paper/paper.tex +0 -6
- package/fixtures/paper-research-question/draft/PIPELINE-STATUS.md +0 -6
- package/fixtures/paper-research-question/draft/paper.tex +0 -2
- package/fixtures/paper-research-question/markdown-no-rq/PIPELINE-STATUS.md +0 -9
- package/fixtures/paper-research-question/markdown-no-rq/paper.md +0 -4
- package/fixtures/paper-research-question/shipped-no-rq/PIPELINE-STATUS.md +0 -12
- package/fixtures/paper-research-question/shipped-no-rq/paper.tex +0 -3
- package/fixtures/paper-research-question/shipped-with-rq/PIPELINE-STATUS.md +0 -10
- package/fixtures/paper-research-question/shipped-with-rq/paper.tex +0 -2
- package/src/action-ref.test.ts +0 -26
- package/src/action-ref.ts +0 -15
package/dist/paper-files.d.ts
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
*
|
|
17
17
|
* 2. **Each rule scoped to the files it was written for** (`ruleOwners` + `narrowToOwners`).
|
|
18
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 `
|
|
20
|
-
* `
|
|
19
|
+
* `stages`/`source`/`author-list` beside `PIPELINE-STATUS.md` and `typography` beside
|
|
20
|
+
* `paper.md`/`paper.tex`. So a consumer block that named `paper/source`
|
|
21
21
|
* for every file under the papers directory reached `paper.tex`, where `paper` has no `source`
|
|
22
22
|
* — and ESLint threw `Could not find "source" in plugin "paper"` from inside `lintFiles`,
|
|
23
23
|
* after paperlint's own validation had (correctly) accepted the id. A block is therefore split
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AbsolutePath } from "./domain/paths.ts";
|
|
2
|
+
import type { ConfigBlock } from "./rules-config.ts";
|
|
3
|
+
import { type PaperDeps, type Unread } from "./tex-paper.ts";
|
|
4
|
+
/** One paper's main file and body files, and the includes that resolved nowhere. */
|
|
5
|
+
export interface PaperBody {
|
|
6
|
+
readonly dir: string;
|
|
7
|
+
readonly main: AbsolutePath;
|
|
8
|
+
readonly files: readonly AbsolutePath[];
|
|
9
|
+
readonly missing: readonly Unread[];
|
|
10
|
+
}
|
|
11
|
+
/** The body of each paper directory in `dirs` that has a `paper.tex`. */
|
|
12
|
+
export declare function paperBodies(dirs: readonly string[], deps: PaperDeps): readonly PaperBody[];
|
|
13
|
+
/** The config blocks that hand ESLint each paper's body files, and the paper to every one of them. */
|
|
14
|
+
export declare const includeBlocks: (bodies: readonly PaperBody[]) => readonly ConfigBlock[];
|
|
15
|
+
/** One line per include that resolved nowhere: which text lint did not read, and why. */
|
|
16
|
+
export declare const unreadLines: (bodies: readonly PaperBody[], shown: (path: string) => string) => readonly string[];
|
|
17
|
+
//# sourceMappingURL=paper-includes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paper-includes.d.ts","sourceRoot":"","sources":["../src/paper-includes.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAa,KAAK,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExE,oFAAoF;AACpF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,yEAAyE;AACzE,wBAAgB,WAAW,CACzB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,IAAI,EAAE,SAAS,GACd,SAAS,SAAS,EAAE,CAQtB;AAED,sGAAsG;AACtG,eAAO,MAAM,aAAa,GACxB,QAAQ,SAAS,SAAS,EAAE,KAC3B,SAAS,WAAW,EAcnB,CAAC;AAEL,yFAAyF;AACzF,eAAO,MAAM,WAAW,GACtB,QAAQ,SAAS,SAAS,EAAE,EAC5B,OAAO,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,KAC9B,SAAS,MAAM,EAOf,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE FILES OF A PAPER'S BODY, handed to ESLint — so the rules over ESLint's LaTeX text read a paper
|
|
3
|
+
* whose body is in `sections/*.tex`, and report each finding at its own file and line (#144).
|
|
4
|
+
*
|
|
5
|
+
* The set is what TeX reads, resolved by the reader the parse-tree rules use (`bodyFiles`,
|
|
6
|
+
* src/tex-paper.ts): `paper.tex` and every file an include in its document body brings in, found in
|
|
7
|
+
* the paper's directory. Not a glob over every `.tex`: a frozen version under `versions/`, a macro
|
|
8
|
+
* file the preamble includes and a scratch file nothing includes are not the paper.
|
|
9
|
+
*
|
|
10
|
+
* Two blocks per paper, both relative to the paper's directory (`basePath`):
|
|
11
|
+
*
|
|
12
|
+
* 1. a global un-ignore of each body file by name. paperlint's scope ignores every file it does not
|
|
13
|
+
* claim (src/paper-files.ts); the fragment block (`buildConfig`) claims every `.tex` but
|
|
14
|
+
* `paper.tex`, so only the files named here are ever enumerated;
|
|
15
|
+
* 2. `settings.paperlint.paper` for `paper.tex` and its body files: the main file and the whole set,
|
|
16
|
+
* for the rules whose verdict is the paper's (eslint-rules/paper-context.ts).
|
|
17
|
+
*/
|
|
18
|
+
import { join, relative } from "node:path";
|
|
19
|
+
import { PAPERLINT_SETTINGS } from "#eslint-rules/paper-context";
|
|
20
|
+
import { callerPath } from "./caller-path.js";
|
|
21
|
+
import { bodyFiles } from "./tex-paper.js";
|
|
22
|
+
/** The body of each paper directory in `dirs` that has a `paper.tex`. */
|
|
23
|
+
export function paperBodies(dirs, deps) {
|
|
24
|
+
return dirs.flatMap((dir) => {
|
|
25
|
+
const main = callerPath(join(dir, "paper.tex"));
|
|
26
|
+
const bytes = deps.files.readBytes(main);
|
|
27
|
+
if (bytes === null)
|
|
28
|
+
return [];
|
|
29
|
+
const body = bodyFiles(main, new TextDecoder().decode(bytes), deps);
|
|
30
|
+
return [{ dir, main, files: body.files, missing: body.missing }];
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/** The config blocks that hand ESLint each paper's body files, and the paper to every one of them. */
|
|
34
|
+
export const includeBlocks = (bodies) => bodies.flatMap((b) => {
|
|
35
|
+
const rel = b.files.map((f) => relative(b.dir, f));
|
|
36
|
+
const paper = { main: b.main, files: [b.main, ...b.files] };
|
|
37
|
+
return [
|
|
38
|
+
...(rel.length > 0
|
|
39
|
+
? [{ basePath: b.dir, ignores: rel.map((r) => `!${r}`) }]
|
|
40
|
+
: []),
|
|
41
|
+
{
|
|
42
|
+
basePath: b.dir,
|
|
43
|
+
files: ["paper.tex", ...rel],
|
|
44
|
+
settings: { [PAPERLINT_SETTINGS]: { paper } },
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
});
|
|
48
|
+
/** One line per include that resolved nowhere: which text lint did not read, and why. */
|
|
49
|
+
export const unreadLines = (bodies, shown) => bodies.flatMap((b) => b.missing.map((m) => `${shown(b.main)}: lint did not read \`${m.target}\` (included by ${m.file}): ` +
|
|
50
|
+
"no such file in the paper's directory or paperlint's inputs"));
|
|
51
|
+
//# sourceMappingURL=paper-includes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paper-includes.js","sourceRoot":"","sources":["../src/paper-includes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,SAAS,EAA+B,MAAM,gBAAgB,CAAC;AAUxE,yEAAyE;AACzE,MAAM,UAAU,WAAW,CACzB,IAAuB,EACvB,IAAe;IAEf,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC1B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC;QAChD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;QACpE,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC;AAED,sGAAsG;AACtG,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAA4B,EACJ,EAAE,CAC1B,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EA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unknown>>;
|
|
33
33
|
readonly linterOptions?: Readonly<Record<string, unknown>>;
|
|
34
34
|
readonly rules?: Readonly<Record<string, unknown>>;
|
|
35
|
+
readonly settings?: Readonly<Record<string, unknown>>;
|
|
35
36
|
}
|
|
36
37
|
export type Parsed<T> = {
|
|
37
38
|
readonly ok: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules-config.d.ts","sourceRoot":"","sources":["../src/rules-config.ts"],"names":[],"mappings":"AA6BA,qDAAqD;AACrD,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5D,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAErE,yFAAyF;AACzF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CACrD;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACxD;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,C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C;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAUnD,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAEvE;AAeD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,CAAC,EAAE,OAAO,EACV,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAC3B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAiBnC;AA6CD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,EAC5B,OAAO,EAAE,MAAM,GACd,MAAM,CAAC,SAAS,SAAS,EAAE,CAAC,CAsB9B;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,WAAW,EAAE,EAC9B,OAAO,EAAE,SAAS,OAAO,EAAE,GAC1B,GAAG,CAAC,MAAM,CAAC,CAUb"}
|
package/dist/rules-config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules-config.js","sourceRoot":"","sources":["../src/rules-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"rules-config.js","sourceRoot":"","sources":["../src/rules-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA8ClD,MAAM,UAAU,GAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1E,MAAM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AAK,YAAY,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE;YACxD,OAAO;YACP,OAAO;SACR,CAAC,CAAC;QACH,IAAI,CAAC,CAAC,CAAC,EAAE;YAAE,OAAO,CAAC,CAAC;QACpB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AAClC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,MAA8B,EAC9B,OAA2B;IAE3B,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;YACjE,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAAE,SAAS;YACvC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;gBAChD,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/structure.js
CHANGED
|
@@ -108,7 +108,7 @@ export function checkStructure(paths, structure,
|
|
|
108
108
|
*/
|
|
109
109
|
function whyMissingMatters(file, dirName) {
|
|
110
110
|
if (file === "PIPELINE-STATUS.md")
|
|
111
|
-
return `the stage
|
|
111
|
+
return `the stage and source checks are skipped for \`${dirName}\``;
|
|
112
112
|
return `declared as required by your \`structure\` configuration`;
|
|
113
113
|
}
|
|
114
114
|
export function formatStructure(findings) {
|
package/dist/structure.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/D,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3C,QAAQ;QACR,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,OAAe,EAAE,EAAE,CAAC,CAAC;YACvC,MAAM,EAAE,yBAAyB;YACjC,QAAQ,EAAE,CAAC;YACX,OAAO;YACP,IAAI,EAAE,CAAC;YACP,MAAM,EAAE,CAAC;SACV,CAAC,CAAC;QACH,UAAU,EAAE,IAAI,CAAC,MAAM;QACvB,eAAe,EAAE,CAAC;QAClB,YAAY,EAAE,CAAC;QACf,iBAAiB,EAAE,CAAC;QACpB,mBAAmB,EAAE,CAAC;QACtB,kBAAkB,EAAE,EAAE;QACtB,mBAAmB,EAAE,EAAE;KACxB,CAAC,CAAC,CAAC;AACN,CAAC"}
|
package/dist/tex-paper.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type PaperSource } from "./domain/paper-source.ts";
|
|
2
2
|
import type { LatexReader } from "./ports/latex.ts";
|
|
3
3
|
import type { Files } from "./ports/files.ts";
|
|
4
|
-
import type {
|
|
4
|
+
import type { AbsolutePath } from "./domain/paths.ts";
|
|
5
|
+
import type { Located, TexRuleContext } from "./tex-venue-rules.ts";
|
|
5
6
|
/** What reading a paper needs: the disk, and the LaTeX reader. */
|
|
6
7
|
export interface PaperDeps {
|
|
7
8
|
readonly files: Files;
|
|
@@ -9,11 +10,24 @@ export interface PaperDeps {
|
|
|
9
10
|
}
|
|
10
11
|
/** The paper whose main file is `filename` with the text `src`, its includes spliced. */
|
|
11
12
|
export declare function readPaper(filename: string, src: string, deps: PaperDeps): PaperSource;
|
|
13
|
+
/** An include that resolved nowhere: the file that wrote it, and the path as written. */
|
|
14
|
+
export interface Unread {
|
|
15
|
+
readonly file: string;
|
|
16
|
+
readonly target: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The files of the body of the paper whose main file is `filename`: every file an include inside its
|
|
20
|
+
* `document` environment brings in, nested ones too, found in the paper's own directory. Not a
|
|
21
|
+
* preamble include (macros are not the body), and not a file found only in paperlint's inputs (not
|
|
22
|
+
* the author's text). `missing` is every include, anywhere, that resolved nowhere.
|
|
23
|
+
*/
|
|
24
|
+
export declare function bodyFiles(filename: string, src: string, deps: PaperDeps): {
|
|
25
|
+
readonly files: readonly AbsolutePath[];
|
|
26
|
+
readonly missing: readonly Unread[];
|
|
27
|
+
};
|
|
12
28
|
/**
|
|
13
29
|
* Each finding reported in the main file: at its own place, or at the include that brought its text
|
|
14
30
|
* in, named in the message (`sections/results.tex:12:3: …`). Offsets are the assembled text's.
|
|
15
31
|
*/
|
|
16
32
|
export declare function reportInPaper(context: TexRuleContext, messages: Readonly<Record<string, string>>, paper: PaperSource, findings: readonly Located[]): void;
|
|
17
|
-
/** The includes that name no file, each reported where it stands in the main file. */
|
|
18
|
-
export declare const missingInputRule: (deps: PaperDeps) => TexRuleModule;
|
|
19
33
|
//# sourceMappingURL=tex-paper.d.ts.map
|
package/dist/tex-paper.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tex-paper.d.ts","sourceRoot":"","sources":["../src/tex-paper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tex-paper.d.ts","sourceRoot":"","sources":["../src/tex-paper.ts"],"names":[],"mappings":"AAcA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEpE,kEAAkE;AAClE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAED,yFAAyF;AACzF,wBAAgB,SAAS,CACvB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,SAAS,GACd,WAAW,CAWb;AAQD,yFAAyF;AACzF,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,SAAS,GACd;IACD,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAsBA;AAoCD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC1C,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B,IAAI,CAiBN"}
|
package/dist/tex-paper.js
CHANGED
|
@@ -7,15 +7,14 @@
|
|
|
7
7
|
* file at the include in `paper.tex` that brought it in — the one place ESLint can point to in this
|
|
8
8
|
* file — with the included file, line and column at the front of the message.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* text they never read, and TeX stops on it too. Warn, not error: a file a build step writes (a
|
|
14
|
-
* table of generated numbers) is legitimately absent before that step has run.
|
|
10
|
+
* An include is looked for where the build tells TeX to look (`texSearchPath`): the paper's own
|
|
11
|
+
* directory, then paperlint's inputs. `bodyFiles` names the files of the paper's BODY the author
|
|
12
|
+
* wrote — what the rules over ESLint's own LaTeX text read one by one, each at its own path.
|
|
15
13
|
*/
|
|
16
14
|
import { basename, dirname, join } from "node:path";
|
|
17
15
|
import { assemblePaper, originOf, } from "./domain/paper-source.js";
|
|
18
16
|
import { callerPath } from "./caller-path.js";
|
|
17
|
+
import { texSearchPath } from "./package-dirs.js";
|
|
19
18
|
/** The paper whose main file is `filename` with the text `src`, its includes spliced. */
|
|
20
19
|
export function readPaper(filename, src, deps) {
|
|
21
20
|
const dir = dirname(filename);
|
|
@@ -23,11 +22,42 @@ export function readPaper(filename, src, deps) {
|
|
|
23
22
|
includes: deps.latex.includes,
|
|
24
23
|
documentBody: deps.latex.documentBody,
|
|
25
24
|
read: (rel) => {
|
|
26
|
-
const
|
|
25
|
+
const at = located(dir, rel, deps.files);
|
|
26
|
+
const b = at === null ? null : deps.files.readBytes(at);
|
|
27
27
|
return b === null ? null : new TextDecoder().decode(b);
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
+
/** `rel` in the first directory of the paper's TeX search path that holds it, or null. */
|
|
32
|
+
const located = (dir, rel, files) => texSearchPath(dir)
|
|
33
|
+
.map((d) => callerPath(join(d, rel)))
|
|
34
|
+
.find((p) => files.isFile(p)) ?? null;
|
|
35
|
+
/**
|
|
36
|
+
* The files of the body of the paper whose main file is `filename`: every file an include inside its
|
|
37
|
+
* `document` environment brings in, nested ones too, found in the paper's own directory. Not a
|
|
38
|
+
* preamble include (macros are not the body), and not a file found only in paperlint's inputs (not
|
|
39
|
+
* the author's text). `missing` is every include, anywhere, that resolved nowhere.
|
|
40
|
+
*/
|
|
41
|
+
export function bodyFiles(filename, src, deps) {
|
|
42
|
+
const dir = dirname(filename);
|
|
43
|
+
const paper = readPaper(filename, src, deps);
|
|
44
|
+
const body = deps.latex.documentBody(src);
|
|
45
|
+
const inBody = (via) => via !== null &&
|
|
46
|
+
(body === null || (via.start >= body.start && via.end <= body.end));
|
|
47
|
+
const own = (rel) => {
|
|
48
|
+
const at = located(dir, rel, deps.files);
|
|
49
|
+
return at === callerPath(join(dir, rel)) ? at : null;
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
files: [
|
|
53
|
+
...new Set(paper.segments
|
|
54
|
+
.filter((s) => s.file !== paper.main && inBody(s.via))
|
|
55
|
+
.map((s) => own(s.file))
|
|
56
|
+
.filter((f) => f !== null)),
|
|
57
|
+
],
|
|
58
|
+
missing: paper.missing.map(({ file, target }) => ({ file, target })),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
31
61
|
/** Line and column (1-based) of an offset in a text. */
|
|
32
62
|
function lineColumn(text, at) {
|
|
33
63
|
const line = text.slice(0, at).split("\n").length;
|
|
@@ -70,36 +100,4 @@ export function reportInPaper(context, messages, paper, findings) {
|
|
|
70
100
|
});
|
|
71
101
|
});
|
|
72
102
|
}
|
|
73
|
-
const MISSING_META = {
|
|
74
|
-
type: "problem",
|
|
75
|
-
docs: {
|
|
76
|
-
description: "an \\input, \\include or \\subfile names a file that is not there, so no rule read its text",
|
|
77
|
-
url: "https://github.com/zernie/paperlint/blob/main/docs/rules/tex/missing-input.md",
|
|
78
|
-
},
|
|
79
|
-
schema: [],
|
|
80
|
-
messages: {
|
|
81
|
-
missing: "`{{target}}` is not there (tried `{{target}}.tex` and `{{target}}`, from the paper's directory): TeX stops on it, and no rule read what it should hold",
|
|
82
|
-
missingIn: "`{{target}}`, which {{file}} includes, is not there (tried `{{target}}.tex` and `{{target}}`, from the paper's directory): TeX stops on it, and no rule read what it should hold",
|
|
83
|
-
},
|
|
84
|
-
};
|
|
85
|
-
/** The includes that name no file, each reported where it stands in the main file. */
|
|
86
|
-
export const missingInputRule = (deps) => ({
|
|
87
|
-
meta: MISSING_META,
|
|
88
|
-
create(context) {
|
|
89
|
-
return {
|
|
90
|
-
root() {
|
|
91
|
-
const sc = context.sourceCode;
|
|
92
|
-
const paper = readPaper(context.filename, sc.raw ?? sc.text, deps);
|
|
93
|
-
const loc = (i) => sc.getLocFromIndex(i);
|
|
94
|
-
paper.missing.forEach((m) => {
|
|
95
|
-
context.report({
|
|
96
|
-
loc: { start: loc(m.via.start), end: loc(m.via.end) },
|
|
97
|
-
messageId: m.file === paper.main ? "missing" : "missingIn",
|
|
98
|
-
data: { target: m.target, file: m.file },
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
},
|
|
102
|
-
};
|
|
103
|
-
},
|
|
104
|
-
});
|
|
105
103
|
//# sourceMappingURL=tex-paper.js.map
|
package/dist/tex-paper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tex-paper.js","sourceRoot":"","sources":["../src/tex-paper.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tex-paper.js","sourceRoot":"","sources":["../src/tex-paper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EACL,aAAa,EACb,QAAQ,GAET,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AASlD,yFAAyF;AACzF,MAAM,UAAU,SAAS,CACvB,QAAgB,EAChB,GAAW,EACX,IAAe;IAEf,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC9B,OAAO,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE;QAC5C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;QAC7B,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY;QACrC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;YACZ,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YACzC,MAAM,C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AAG,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,CAAC;YAC5B,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;SACzB,CAAC;QACF,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI;YACjB,OAAO,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;;YAErE,OAAO,CAAC,MAAM,CAAC;gBACb,GAAG,EAAE,KAAK;gBACV,kFAAkF;gBAClF,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE;aAC9E,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/docs/configuration.md
CHANGED
|
@@ -230,15 +230,16 @@ write. It prints its plan first, one line per step, then runs it:
|
|
|
230
230
|
|
|
231
231
|
```
|
|
232
232
|
papers/my-paper
|
|
233
|
-
inputs: TEXINPUTS += <paperlint>/presets/tex
|
|
233
|
+
inputs: TEXINPUTS += the paper's directory, then <paperlint>/presets/tex
|
|
234
234
|
compile: paper.tex (\documentclass[sigconf,screen]{acmart}, venue agenticdev)
|
|
235
235
|
measure: pdf.js → _build/paper.facts.json (facts for the lint rules; nothing is judged here)
|
|
236
236
|
✓ paper.pdf — 4 pdflatex passes, 1 bibtex run; facts: _build/paper.facts.json, last page 621.5 / 264.8 pt
|
|
237
237
|
```
|
|
238
238
|
|
|
239
|
-
- **inputs** — paperlint's own venue files
|
|
240
|
-
so `\input{paper-guards}` in a preamble resolves with no
|
|
241
|
-
|
|
239
|
+
- **inputs** — `TEXINPUTS` is the paper's directory, then paperlint's own venue files
|
|
240
|
+
(`paper-guards.tex`, `<venue>.tex`), so `\input{paper-guards}` in a preamble resolves with no
|
|
241
|
+
setup and a file of the paper's own wins over paperlint's of the same name. The system tree still
|
|
242
|
+
resolves after them. `paperlint lint` looks for an included file in the same places.
|
|
242
243
|
- **compile** — `pdflatex -interaction=nonstopmode -halt-on-error -file-line-error`, then `bibtex`
|
|
243
244
|
when the `.aux` names a bibliography, then pdflatex again until the `.aux`, `.toc`, `.out` and
|
|
244
245
|
`.bbl` stop changing and the log stops asking for a rerun. bibtex runs again only when the cited
|
package/docs/install.md
CHANGED
|
@@ -33,7 +33,7 @@ In order:
|
|
|
33
33
|
on the defaults gets no config file at all.
|
|
34
34
|
3. **Links each shipped skill** into `.claude/skills/<name>`, where Claude Code looks for skills.
|
|
35
35
|
4. **Writes the hook commands** into `.claude/settings.json`, beside your own entries.
|
|
36
|
-
5. **Offers a GitHub Actions workflow
|
|
36
|
+
5. **Offers a GitHub Actions workflow** that runs `npm ci`, then the action from `node_modules`.
|
|
37
37
|
6. **Offers a first paper** (`paperlint new`) if the papers directory has none.
|
|
38
38
|
7. **Offers TeX Live** for `paperlint build` (`paperlint toolchain`, ~270 MB, ~3 min, once), with
|
|
39
39
|
the size in the question and NO as the default. Without a terminal it asks nothing and lists the
|
|
@@ -47,13 +47,13 @@ question (Ctrl+D) also takes the default.
|
|
|
47
47
|
|
|
48
48
|
## What `paperlint init` writes
|
|
49
49
|
|
|
50
|
-
| what
|
|
51
|
-
|
|
|
52
|
-
| `{ "papersDir": … }` naming your papers directory
|
|
53
|
-
| the three hook commands, merged in beside your own entries
|
|
54
|
-
| a GitHub Actions workflow
|
|
55
|
-
| a first paper, via `paperlint new`
|
|
56
|
-
| one relative symlink per shipped skill, into the installed package
|
|
50
|
+
| what | where | when |
|
|
51
|
+
| -------------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
52
|
+
| `{ "papersDir": … }` naming your papers directory | `paperlint.json` | only when it is not the default `papers` |
|
|
53
|
+
| the three hook commands, merged in beside your own entries | `.claude/settings.json` | by default. A human at a terminal is asked [Y/n]; an agent, CI or `--yes` gets YES; `--no-hooks` skips. Hand-wired under another spelling: nothing written, so nothing runs twice |
|
|
54
|
+
| a GitHub Actions workflow: `npm ci`, then `./node_modules/paperlint` | `.github/workflows/` | only if you say yes; it asks once, and only when a human is at a terminal (stdin and stdout, no `CI`, no `--yes`) |
|
|
55
|
+
| a first paper, via `paperlint new` | `<papers>/<name>/` | only when the papers directory holds none: asked of a human at a terminal, otherwise only with `--paper <name>` |
|
|
56
|
+
| one relative symlink per shipped skill, into the installed package | `.claude/skills/<name>` | always — except where that name is already taken (a directory, a file, a link elsewhere): that entry is left as it is and named in the report |
|
|
57
57
|
|
|
58
58
|
It installs no software you did not say yes to, and touches nothing else. Commit `.claude/settings.json` so every clone
|
|
59
59
|
gets the hooks; the hook commands run files inside `node_modules`, so a fresh clone needs
|
|
@@ -86,7 +86,6 @@ listed so nobody thinks the two are consistent.
|
|
|
86
86
|
| `paper/stages` (error) | `eslint-rules/paper-stages.mjs:91`, glob `src/cli.ts:126` | front matter `stages[]`: `stage`, `date`, `pdf`, `bytes`; and lists `versions/*.pdf` |
|
|
87
87
|
| `paper/source` (error) | `eslint-rules/paper-stages.mjs:377`, `:415`, `:442` | `stages[].source`, `sourceBytes`, `sourceLost` |
|
|
88
88
|
| `paper/author-list` (warn) | `eslint-rules/paper-stages.mjs:296`, marker `:325` | `stages[]` + searches the scorecard **table cells** for the marker `bib-authors` |
|
|
89
|
-
| `paper/research-question` (warn) | `eslint-rules/paper-research-question.mjs:142` | reads the status file from disk while linting `paper.tex`/`paper.md`: `stages`, `researchQuestion` |
|
|
90
89
|
| `paper/typography` (warn) | `src/cli.ts:118` | **not** the status file — its per-paper allowance lives in the ROOT key `typographyDebt`, keyed by paper path |
|
|
91
90
|
| `pipeline-check.mjs` (skill script) | `skills/paper-pipeline/scripts/pipeline-check.mjs:231-321` | the `Venue:` / `Deadline:` header line, the verdict line, the five section tables |
|
|
92
91
|
| `paper-status-gates` hook | `hooks/paper-status-gates.hook.mjs` | surfaces the verdict and unrun gates after an edit |
|
|
@@ -111,7 +110,6 @@ content of those files is reproduced here.)
|
|
|
111
110
|
| ------------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
112
111
|
| paper short name / title | **config** | human, once — `rpp new` can prefill from the folder name |
|
|
113
112
|
| venue, deadline, blind model (the `Venue:` header line) | **config** | human; changes when the paper is re-targeted |
|
|
114
|
-
| `researchQuestion` | **config** | human, once |
|
|
115
113
|
| format (`.tex` vs `.md`) | **derived** | from which source file exists |
|
|
116
114
|
| venue profile, paper kind, pdf path (a separate `venue.json` in one real paper) | **config** | human; already a per-paper file in practice |
|
|
117
115
|
| typography allowance (`typographyDebt`) | **config** | human, but it sits in the root key keyed by path today |
|
|
@@ -202,7 +200,7 @@ written once at freeze time, then checked forever — and today a human types it
|
|
|
202
200
|
- **Root (`package.json` key): the papers directory only.** Unchanged. It stays a scope, like
|
|
203
201
|
Quarto's project dir or Astro's collection glob. No list of papers.
|
|
204
202
|
- **Per paper: the paper folder's `PIPELINE-STATUS.md` front matter** holds that paper's config
|
|
205
|
-
(
|
|
203
|
+
(the venue/deadline fields that today live in a prose header line) and
|
|
206
204
|
its stage records. Unchanged carrier, so every existing paper keeps working.
|
|
207
205
|
- **Not recommended now: a separate `paper.yml`.** It would split config from the journal cleanly
|
|
208
206
|
(the 1 300-line files are 98% journal), but it moves every rule's input and every consumer's
|
|
@@ -214,9 +212,8 @@ written once at freeze time, then checked forever — and today a human types it
|
|
|
214
212
|
**`rpp new <name> [--format tex|md]`** — creates `<papers>/<name>/` with:
|
|
215
213
|
|
|
216
214
|
- `paper.tex` or `paper.md` (a minimal stub; `--format` defaults to `tex` — ask when interactive);
|
|
217
|
-
- `PIPELINE-STATUS.md` from a **template file** shipped in the package, with the name filled in
|
|
218
|
-
|
|
219
|
-
shipped nothing — `paper-stages.mjs:24`).
|
|
215
|
+
- `PIPELINE-STATUS.md` from a **template file** shipped in the package, with the name filled in and
|
|
216
|
+
**no** `stages` field (a new paper has shipped nothing — `paper-stages.mjs:24`).
|
|
220
217
|
|
|
221
218
|
Rules for it, each taken from a tool above:
|
|
222
219
|
|
|
@@ -251,7 +248,7 @@ the skills tell agents to update them.
|
|
|
251
248
|
| ------------------------------------------ | ------------------------- | ----------------------------------------------------------------------- |
|
|
252
249
|
| the folder and source stub | human | `rpp new` |
|
|
253
250
|
| `PIPELINE-STATUS.md` skeleton | human copies a code fence | `rpp new` |
|
|
254
|
-
|
|
|
251
|
+
| venue, deadline | human | human (unchanged) |
|
|
255
252
|
| `stages` records, bytes, the frozen copies | human types byte counts | still human; `rpp freeze` is the later step that takes it over |
|
|
256
253
|
| `sourceLost` exceptions | human | human (unchanged) |
|
|
257
254
|
| `State:`, `Updated:`, `Requires` cells | human | still human; **derivable** — candidates to drop from the template later |
|
package/docs/rules.md
CHANGED
|
@@ -8,21 +8,19 @@ reads and when it fails. Errors fail `paperlint lint`; warnings print and do not
|
|
|
8
8
|
| `paper/stages` | error | `PIPELINE-STATUS.md` | a declared stage's PDF is missing, or the `bytes:` it names does not match the file's real size, or a frozen PDF exists that no stage declares |
|
|
9
9
|
| `paper/source` | error | `PIPELINE-STATUS.md` | a declared stage has no frozen `.tex` beside its PDF (a commit hash does not count — squash and gc destroy it) |
|
|
10
10
|
| `paper/author-list` | error | `paper.tex` → `_build/references.json` | an entry's authors are not those of the version it cites — typically the arXiv preprint's list under a published venue. Checked online by `paperlint build` (DBLP), reported on the entry's own line |
|
|
11
|
-
| `paper/
|
|
12
|
-
| `paper/
|
|
13
|
-
| `paper/
|
|
14
|
-
| `paper/figure-ref-style` | warn | `paper.tex` | `Fig.~\ref` and `Figure~\ref` mixed in one document; each minority occurrence is reported. **Fixable:** `--fix` writes the majority form |
|
|
11
|
+
| `paper/section-word` | warn | `paper.tex` and its body files, `paper.md` | `§` or `\S\ref` instead of the word Section. **Fixable:** `--fix` writes `Section~\ref{…}` / `Section 5` |
|
|
12
|
+
| `paper/leading-zero` | warn | `paper.tex` and its body files, `paper.md` | a decimal below 1 without its leading zero (`.05` instead of `0.05`, IEEE / ISO 80000-1 style), counted only where the reader sees it — prose, math and table cells, not macro options, column specs, comments, code or tikz. A number right after `¶` or `§` (`¶¶.42`) is a paragraph designator and is not reported; in a paragraph that cites numbers that way, another bare decimal is reported without a fix, with the zero as a suggestion. **Fixable** |
|
|
13
|
+
| `paper/figure-ref-style` | warn | `paper.tex` and its body files | `Fig.~\ref` and `Figure~\ref` mixed in one document; each minority occurrence is reported. **Fixable:** `--fix` writes the majority form |
|
|
15
14
|
| `bib/reachable-entry` | warn | `paper.tex` (its `filecontents` bibliography) | an entry has no doi, url or arXiv id — a reader has nothing to follow. Reported on the entry; no fix, the link has to be looked up |
|
|
16
15
|
| `paper/cite-exists` | error | `paper.tex` → `_build/references.json` | an entry's doi or arXiv id resolves to nothing, or to a different work. Checked online by `paperlint build`; a work that was merely not found is not a finding |
|
|
17
16
|
| `paper/refs-fresh` | error | `paper.tex` → `_build/references.json` | the bibliography changed since the build checked it (its SHA-256 differs) — run `npx paperlint build` |
|
|
18
17
|
| `paper/refs-checked` | warn | `paper.tex` → `_build/references.json` | the paper has a bibliography and no build has checked it, or the last build could not (no network) — so the two rules above did not run |
|
|
19
|
-
| `tex/future-promise` | warn | `paper.tex`
|
|
18
|
+
| `tex/future-promise` | warn | `paper.tex` and its body files | a camera-ready build still says "will be released" about something already handed over |
|
|
20
19
|
| `tex/acm-frontmatter-override` | error | `paper.tex` | an `acmart` build overrides ACM's front-matter commands and drops template elements from page 1 |
|
|
21
20
|
| [`tex/template`](rules/tex/template.md) | error | `paper.tex` → `paperlint.json` | the `\documentclass` is not the preset's `template` class, or lacks an option it names — [page](rules/tex/template.md) |
|
|
22
21
|
| [`tex/required-section`](rules/tex/required-section.md) | error | `paper.tex` → `paperlint.json` | a section the preset requires (AIDC: «LLM Usage Statement», last) is missing or not where it must be — [page](rules/tex/required-section.md) |
|
|
23
22
|
| [`tex/venue-leftover`](rules/tex/venue-leftover.md) | warn | `paper.tex` → `paperlint.json` | the text names another shipped venue than the one the paper extends («Submission to VenueA 2026» in a paper now set for VenueB) — [page](rules/tex/venue-leftover.md) |
|
|
24
23
|
| [`tex/claim-provenance`](rules/tex/claim-provenance.md) | warn | `paper.tex` | a sentence of the body states a number and does not say whose it is — no citation or link, no _we_/_our_, no `\ref` or "Table 2", no sample ("n = 134", "48 runs") — [page](rules/tex/claim-provenance.md) |
|
|
25
|
-
| [`tex/missing-input`](rules/tex/missing-input.md) | warn | `paper.tex` and the files it includes | an `\input`, `\include` or `\subfile` names a file that is not there, so no rule read its text — [page](rules/tex/missing-input.md) |
|
|
26
24
|
| [`tex/register`](rules/tex/register.md) | warn | `paper.tex` and the files it includes | the body runs to a post's register: more than 0.8 sentences per 1000 words open with _And_, _So_, _But_, _Nor_, _Or_ or _Yet_ — the limit is an option — [page](rules/tex/register.md) |
|
|
27
25
|
| `review/frontmatter` | error | `reviews/*.md` | the review's frontmatter fails paperlint's JSON Schema — a `findings` record without `id`/`status`, an unknown field, or an **open** finding with no `cause` (`skill-defect` · `missing-skill` · `hook` · `rule`). A review with no `findings` key is not checked for findings |
|
|
28
26
|
| `sibling/frontmatter` | warn | `siblings/*.md` (not `README.md`) | a sibling card's frontmatter has no `read:` saying how much of the competing paper was read (`full` · `abstract` · `none`) |
|
|
@@ -34,6 +32,13 @@ reads and when it fails. Errors fail `paperlint lint`; warnings print and do not
|
|
|
34
32
|
| `pdf/body-size` | warn | `paper.tex` → `_build/paper.facts.json` | the body font size is more than `body_pt_tol` off the preset's. A warning: banal measures the mode of the rendered text, not the declared size (9.30 pt measured at a declared 9) |
|
|
35
33
|
| `pdf/measured` | warn | `paper.tex` → `_build/paper.facts.json` | the paper's `paperlint.json` names no venue preset yet; or it names one and there are no facts (it was not built), or the facts carry no page geometry (banal was not found) — so the checks above did not run |
|
|
36
34
|
|
|
35
|
+
**Body files** are the files `paper.tex` includes from its document body (`\input`, `\include`,
|
|
36
|
+
`\subfile`, nested ones too), found in the paper's directory — not a preamble include, not a file
|
|
37
|
+
found only in paperlint's own inputs, and not any other `.tex` beside the paper (`versions/`). A
|
|
38
|
+
finding in one is reported at that file and line, and `--fix` edits that file. Which reference form
|
|
39
|
+
is the majority and whether the build is a review build are decided over the whole paper. An include
|
|
40
|
+
that names no file is printed as a note: lint did not read it, and the build will stop on it.
|
|
41
|
+
|
|
37
42
|
`tex/required-section` requires AIDC's «LLM Usage Statement» **always**. ACSAC asks for it «if
|
|
38
43
|
LLMs are used», which no rule can know; an author who used none says so in the section
|
|
39
44
|
([page](rules/tex/required-section.md)).
|
|
@@ -214,10 +219,10 @@ Presets from npm packages are not supported yet.
|
|
|
214
219
|
|
|
215
220
|
## The paper is LaTeX
|
|
216
221
|
|
|
217
|
-
The paper body is `paper.tex`, and it gets
|
|
218
|
-
`
|
|
219
|
-
|
|
220
|
-
the
|
|
222
|
+
The paper body is `paper.tex`, and it gets three rules of its own: `paper/typography`,
|
|
223
|
+
`tex/future-promise` and `tex/acm-frontmatter-override` — plus the `pdf/` venue rules above, which
|
|
224
|
+
run on it but judge the files beside it. The scorecard and the review notes are Markdown files, and
|
|
225
|
+
the other five rules read those.
|
|
221
226
|
|
|
222
227
|
A Markdown body (`paper.md`, or `draft.md`) is still read today and gets only the two `paper/`
|
|
223
228
|
rules, which is why they list it above. Markdown papers are deprecated and being removed
|
|
@@ -241,7 +246,6 @@ stages:
|
|
|
241
246
|
bytes: 305412
|
|
242
247
|
source: versions/2026-07-22-submitted.tex
|
|
243
248
|
sourceBytes: 57210
|
|
244
|
-
researchQuestion: "Does pruning the state space reduce review cost?"
|
|
245
249
|
---
|
|
246
250
|
```
|
|
247
251
|
|
|
@@ -51,9 +51,12 @@
|
|
|
51
51
|
* paper. The projection counts differently: the same place gave 1239 words before macro
|
|
52
52
|
* blanking and 1208 after — a 2.5% discrepancy. The discrepancy is ACCEPTED deliberately;
|
|
53
53
|
* the thresholds were not recalibrated.
|
|
54
|
-
* 4.
|
|
55
|
-
*
|
|
56
|
-
*
|
|
54
|
+
* 4. ONE FILE AT A TIME. `\input` / `\include` are in OPAQUE: the projection of `paper.tex`
|
|
55
|
+
* does not hold what they pull in. `paperlint lint` hands ESLint each file the paper includes
|
|
56
|
+
* from its body as a file of its own (src/paper-includes.ts), and a file with no `document`
|
|
57
|
+
* environment is projected as body throughout — so an included file is read where it is,
|
|
58
|
+
* and its findings point into it. An ESLint run outside `paperlint lint` reads only the
|
|
59
|
+
* files it was given.
|
|
57
60
|
* 5. `\appendix` IS NOT IMPLEMENTED and is INEXPRESSIBLE in a length-preserving projection:
|
|
58
61
|
* `\appendix` is 9 characters, `## Appendix` is 11, the synthesis does not fit. On the
|
|
59
62
|
* first paper with a real `\appendix`, `appendix-ref` / `appendix-ratio` yield a silent
|
|
@@ -209,6 +212,9 @@ export type MdNode =
|
|
|
209
212
|
readonly value: string;
|
|
210
213
|
};
|
|
211
214
|
|
|
215
|
+
/** The root of a projection: a node that has children. */
|
|
216
|
+
export type MdRoot = Extract<MdNode, { readonly type: "root" | "strong" }>;
|
|
217
|
+
|
|
212
218
|
/** An inline-config comment: an `html` node's text and where it sits. */
|
|
213
219
|
interface ConfigNode {
|
|
214
220
|
readonly value: string;
|
|
@@ -305,7 +311,7 @@ export function texToMdast(
|
|
|
305
311
|
{
|
|
306
312
|
parse = (s: string): TexRoot => getParser().parse(s),
|
|
307
313
|
}: { parse?: (s: string) => TexRoot } = {},
|
|
308
|
-
): { root:
|
|
314
|
+
): { root: MdRoot; text: string } {
|
|
309
315
|
const ast = parse(src);
|
|
310
316
|
const chars = src.split("");
|
|
311
317
|
const blank = (from: number, to: number) => {
|