paperlint 20.4.0 → 20.6.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-plugin/plugin.json +1 -1
- package/dist/adapters/venue-corpus/index.d.ts.map +1 -1
- package/dist/adapters/venue-corpus/index.js +9 -2
- package/dist/adapters/venue-corpus/index.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +61 -26
- package/dist/cli.js.map +1 -1
- package/dist/corpus-json-rules.d.ts +6 -0
- package/dist/corpus-json-rules.d.ts.map +1 -0
- package/dist/corpus-json-rules.js +15 -0
- package/dist/corpus-json-rules.js.map +1 -0
- package/dist/corpus-layout-rule.d.ts +11 -0
- package/dist/corpus-layout-rule.d.ts.map +1 -0
- package/dist/corpus-layout-rule.js +92 -0
- package/dist/corpus-layout-rule.js.map +1 -0
- package/dist/corpus-licence-rule.d.ts +27 -0
- package/dist/corpus-licence-rule.d.ts.map +1 -0
- package/dist/corpus-licence-rule.js +78 -0
- package/dist/corpus-licence-rule.js.map +1 -0
- package/dist/corpus-record-rule.d.ts +2 -0
- package/dist/corpus-record-rule.d.ts.map +1 -1
- package/dist/corpus-record-rule.js +6 -3
- package/dist/corpus-record-rule.js.map +1 -1
- package/dist/domain/corpus-layout.d.ts +30 -0
- package/dist/domain/corpus-layout.d.ts.map +1 -0
- package/dist/domain/corpus-layout.js +101 -0
- package/dist/domain/corpus-layout.js.map +1 -0
- package/dist/domain/corpus-licence.d.ts +23 -0
- package/dist/domain/corpus-licence.d.ts.map +1 -0
- package/dist/domain/corpus-licence.js +50 -0
- package/dist/domain/corpus-licence.js.map +1 -0
- package/dist/domain/corpus-record.d.ts +8 -0
- package/dist/domain/corpus-record.d.ts.map +1 -1
- package/dist/domain/corpus-record.js +11 -9
- package/dist/domain/corpus-record.js.map +1 -1
- package/dist/domain/edition.d.ts +3 -1
- package/dist/domain/edition.d.ts.map +1 -1
- package/dist/domain/edition.js +6 -2
- package/dist/domain/edition.js.map +1 -1
- package/dist/domain/licence.d.ts +1 -1
- package/dist/domain/licence.d.ts.map +1 -1
- package/dist/domain/licence.js +2 -2
- package/dist/domain/licence.js.map +1 -1
- package/dist/domain/paper-layout.d.ts +3 -2
- package/dist/domain/paper-layout.d.ts.map +1 -1
- package/dist/domain/paper-layout.js +3 -2
- package/dist/domain/paper-layout.js.map +1 -1
- package/dist/paper-files.d.ts +11 -4
- package/dist/paper-files.d.ts.map +1 -1
- package/dist/paper-files.js +16 -2
- package/dist/paper-files.js.map +1 -1
- package/dist/skill-chunks/chunk-QPWFSYJG.js +17 -0
- package/dist/skill-chunks/{chunk-6YEM4VDI.js → chunk-WYQTXKNM.js} +1 -1
- package/docs/design/venue-corpus.md +16 -16
- package/docs/layout.md +2 -2
- package/docs/optional-rules.md +11 -10
- package/docs/rules/corpus/allowed-files-only.md +99 -0
- package/docs/rules/corpus/licence.md +125 -0
- package/docs/rules/corpus/record.md +10 -6
- package/docs/rules.md +3 -1
- package/docs/venues.md +14 -11
- package/package.json +1 -1
- package/skills/argument-arc/scripts/headings.js +2 -2
- package/skills/cold-read-diff/scripts/cold-read.js +5 -5
- package/skills/paper-pipeline/scripts/extract-ref-facts.js +3 -3
- package/skills/pc-panel-review/scripts/prior-reviews.js +2 -1
- package/skills/study-accepted-papers/SKILL.md +4 -3
- package/skills/study-accepted-papers/SKILL.md.spec.ts +3 -2
- package/skills/study-accepted-papers/papers.schema.json +2 -2
- package/skills/study-accepted-papers/scripts/corpus-licences.js +15 -3
- package/skills/study-accepted-papers/scripts/corpus-licences.test.ts +1 -1
- package/skills/verify-citations/scripts/bib-authors.js +3 -3
- package/skills/verify-citations/scripts/verify-cites.js +3 -3
- package/src/adapters/venue-corpus/index.test.ts +25 -0
- package/src/adapters/venue-corpus/index.ts +16 -2
- package/src/cli-e2e.test.mjs +2 -2
- package/src/cli.ts +75 -26
- package/src/corpus-json-rules.ts +22 -0
- package/src/corpus-layout-rule.test.ts +177 -0
- package/src/corpus-layout-rule.ts +145 -0
- package/src/corpus-licence-rule.test.ts +217 -0
- package/src/corpus-licence-rule.ts +94 -0
- package/src/corpus-record-rule.test.ts +27 -4
- package/src/corpus-record-rule.ts +8 -3
- package/src/domain/corpus-layout.test.ts +118 -0
- package/src/domain/corpus-layout.ts +159 -0
- package/src/domain/corpus-licence.test.ts +128 -0
- package/src/domain/corpus-licence.ts +99 -0
- package/src/domain/corpus-record.test.ts +7 -1
- package/src/domain/corpus-record.ts +26 -9
- package/src/domain/edition.ts +8 -2
- package/src/domain/licence.test.ts +1 -1
- package/src/domain/licence.ts +2 -2
- package/src/domain/paper-layout.ts +3 -2
- package/src/layout-docs.test.ts +3 -1
- package/src/paper-files.ts +19 -3
- package/src/rule-cases.test.ts +6 -70
- package/src/rule-id-shape.test.ts +42 -0
- package/src/unowned-file.test.ts +1 -1
- package/dist/skill-chunks/{chunk-CXAGKT44.js → chunk-EDHTB7KT.js} +4 -4
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The rules that judge a venue corpus's `papers.json` (`corpus/record`, `corpus/licence`), as one plugin's rules. */
|
|
2
|
+
import { corpusLicenceRules } from "./corpus-licence-rule.js";
|
|
3
|
+
import { basename } from "node:path";
|
|
4
|
+
import { CORPUS_RECORD } from "./domain/venue-corpus.js";
|
|
5
|
+
import { corpusRecordRules, } from "./corpus-record-rule.js";
|
|
6
|
+
/** Both rules, reading the corpus through `deps`; which of them is on is the config's, not theirs. */
|
|
7
|
+
export const corpusJsonRules = (deps) => ({
|
|
8
|
+
...corpusRecordRules(deps),
|
|
9
|
+
...corpusLicenceRules(deps),
|
|
10
|
+
});
|
|
11
|
+
/** The venue corpora's `papers.json` among `files`, each once: the files a corpus rule is reached through. */
|
|
12
|
+
export const corpusRecords = (files) => [
|
|
13
|
+
...new Set(files.filter((f) => basename(f) === CORPUS_RECORD)),
|
|
14
|
+
];
|
|
15
|
+
//# sourceMappingURL=corpus-json-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus-json-rules.js","sourceRoot":"","sources":["../src/corpus-json-rules.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EACL,iBAAiB,GAGlB,MAAM,yBAAyB,CAAC;AAEjC,sGAAsG;AACtG,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAsB,EACkC,EAAE,CAAC,CAAC;IAC5D,GAAG,iBAAiB,CAAC,IAAI,CAAC;IAC1B,GAAG,kBAAkB,CAAC,IAAI,CAAC;CAC5B,CAAC,CAAC;AAEH,8GAA8G;AAC9G,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAwB,EAAqB,EAAE,CAAC;IAC5E,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,CAAC;CAC/D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JsonRuleModule } from "./corpus-record-rule.ts";
|
|
2
|
+
import type { FolderLayoutDeps } from "./folder-layout-rule.ts";
|
|
3
|
+
/** What the rule reads with: the disk, and the papers roots whose `venues/` hold the corpora. */
|
|
4
|
+
export interface CorpusLayoutDeps extends FolderLayoutDeps {
|
|
5
|
+
readonly roots: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
/** The rule, reading the corpora through `deps`. */
|
|
8
|
+
export declare function corpusLayoutRules(deps: CorpusLayoutDeps): Readonly<Record<"allowed-files-only", JsonRuleModule>>;
|
|
9
|
+
/** On by default, on every corpus's `papers.json` and the root `paperlint.json`. */
|
|
10
|
+
export declare const CORPUS_LAYOUT_RULE_LEVELS: Readonly<Record<"corpus/allowed-files-only", "error">>;
|
|
11
|
+
//# sourceMappingURL=corpus-layout-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus-layout-rule.d.ts","sourceRoot":"","sources":["../src/corpus-layout-rule.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAY/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,iGAAiG;AACjG,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAoFD,oDAAoD;AACpD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,gBAAgB,GACrB,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC,CAoBxD;AAED,oFAAoF;AACpF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAC9C,MAAM,CAAC,2BAA2B,EAAE,OAAO,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `corpus/allowed-files-only` — the top of a venue corpus holds its seven fixed names, and a corpus
|
|
3
|
+
* that stores copies has the record that names them (docs/design/venue-corpus.md, decisions 4 and 5;
|
|
4
|
+
* docs/rules/corpus/allowed-files-only.md). What may stand there is `src/domain/corpus-layout.ts`;
|
|
5
|
+
* this file lists the folders and reports.
|
|
6
|
+
*
|
|
7
|
+
* ── WHERE IT REPORTS ─────────────────────────────────────────────────────────────
|
|
8
|
+
* A stray name: on the corpus's `papers.json`, first line, the file `corpus/record` is linted on. A
|
|
9
|
+
* corpus that keeps `pdf/` or `text/` and has no `papers.json` has no file of its own: it is reported
|
|
10
|
+
* on the project's root `paperlint.json`, which `paperlint lint` lints only when a papers root holds
|
|
11
|
+
* `venues/` (src/cli.ts). Both are linted with ESLint's JSON language; no other file reaches the rule.
|
|
12
|
+
*/
|
|
13
|
+
import { basename, dirname, join, relative, sep } from "node:path";
|
|
14
|
+
import { callerPath } from "./caller-path.js";
|
|
15
|
+
import { corpusStrayMessage, judgeCorpusLayout, judgeVenues, looseMessage, storesWithoutRecord, unrecordedMessage, } from "./domain/corpus-layout.js";
|
|
16
|
+
import { CORPORA_DIR } from "./domain/corpus-record.js";
|
|
17
|
+
import { CORPUS_RECORD } from "./domain/venue-corpus.js";
|
|
18
|
+
import { rulePageUrl } from "./venue-rules.js";
|
|
19
|
+
/** The entries of `dir`, sorted, each a file or a folder; none when it does not exist. */
|
|
20
|
+
const entriesOf = (dir, deps) => [...deps.listDir(callerPath(dir))].sort().map((name) => ({
|
|
21
|
+
name,
|
|
22
|
+
kind: deps.files.isFile(callerPath(join(dir, name))) ? "file" : "dir",
|
|
23
|
+
}));
|
|
24
|
+
/** The text of each stray at the top of the corpus whose `papers.json` is `file`. */
|
|
25
|
+
const strayTexts = (file, deps) => {
|
|
26
|
+
const dir = dirname(file);
|
|
27
|
+
const shown = `${CORPORA_DIR}/${basename(dir)}`;
|
|
28
|
+
return judgeCorpusLayout(entriesOf(dir, deps)).map((s) => corpusStrayMessage(shown, s));
|
|
29
|
+
};
|
|
30
|
+
/** The text of each corpus under `deps.roots` that stores copies with no record, shown from `home`. */
|
|
31
|
+
const unrecordedTexts = (home, deps) => deps.roots
|
|
32
|
+
.map((r) => join(r, CORPORA_DIR))
|
|
33
|
+
.flatMap((venues) => entriesOf(venues, deps)
|
|
34
|
+
.filter((e) => e.kind === "dir")
|
|
35
|
+
.map((e) => join(venues, e.name)))
|
|
36
|
+
.filter((corpus) => storesWithoutRecord(entriesOf(corpus, deps)))
|
|
37
|
+
.map((corpus) => unrecordedMessage(relative(home, corpus).split(sep).join("/")));
|
|
38
|
+
/** The text of each file loose in a `venues/` under `deps.roots`, shown from `home`. */
|
|
39
|
+
const looseTexts = (home, deps) => deps.roots
|
|
40
|
+
.map((r) => join(r, CORPORA_DIR))
|
|
41
|
+
.flatMap((venues) => judgeVenues(entriesOf(venues, deps)).map((name) => looseMessage(relative(home, venues).split(sep).join("/"), name)));
|
|
42
|
+
/**
|
|
43
|
+
* Each finding about the file being linted, by its message id. The config hands the rule two files
|
|
44
|
+
* only (src/cli.ts): a corpus's `papers.json`, and the root settings file.
|
|
45
|
+
*/
|
|
46
|
+
const findingsFor = (file, deps) => basename(file) === CORPUS_RECORD
|
|
47
|
+
? strayTexts(file, deps).map((text) => ({ id: "stray", text }))
|
|
48
|
+
: [
|
|
49
|
+
...unrecordedTexts(dirname(file), deps).map((text) => ({
|
|
50
|
+
id: "unrecorded",
|
|
51
|
+
text,
|
|
52
|
+
})),
|
|
53
|
+
...looseTexts(dirname(file), deps).map((text) => ({
|
|
54
|
+
id: "loose",
|
|
55
|
+
text,
|
|
56
|
+
})),
|
|
57
|
+
];
|
|
58
|
+
const META = {
|
|
59
|
+
type: "suggestion",
|
|
60
|
+
docs: {
|
|
61
|
+
description: "the top of a venue corpus holds papers.json, MANIFEST.md, measurements.json, pdf/, text/, deep-reads/ and sources/, a corpus that stores copies has its papers.json, and venues/ holds only corpus folders and its index",
|
|
62
|
+
url: rulePageUrl("corpus/allowed-files-only"),
|
|
63
|
+
},
|
|
64
|
+
schema: [],
|
|
65
|
+
// The whole text is the domain's message (src/domain/corpus-layout.ts).
|
|
66
|
+
messages: { stray: "{{text}}", unrecorded: "{{text}}", loose: "{{text}}" },
|
|
67
|
+
};
|
|
68
|
+
/** The rule, reading the corpora through `deps`. */
|
|
69
|
+
export function corpusLayoutRules(deps) {
|
|
70
|
+
return {
|
|
71
|
+
"allowed-files-only": {
|
|
72
|
+
meta: META,
|
|
73
|
+
create(context) {
|
|
74
|
+
return {
|
|
75
|
+
Document() {
|
|
76
|
+
const at = context.sourceCode.ast.loc.start;
|
|
77
|
+
findingsFor(context.filename, deps).forEach(({ id, text }) => {
|
|
78
|
+
context.report({
|
|
79
|
+
loc: { start: at, end: at },
|
|
80
|
+
messageId: id,
|
|
81
|
+
data: { text },
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/** On by default, on every corpus's `papers.json` and the root `paperlint.json`. */
|
|
91
|
+
export const CORPUS_LAYOUT_RULE_LEVELS = { "corpus/allowed-files-only": "error" };
|
|
92
|
+
//# sourceMappingURL=corpus-layout-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus-layout-rule.js","sourceRoot":"","sources":["../src/corpus-layout-rule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO/C,0FAA0F;AAC1F,MAAM,SAAS,GAAG,CAChB,GAAW,EACX,IAAsB,EACE,EAAE,CAC1B,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACvD,IAAI;IACJ,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK;CACtE,CAAC,CAAC,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;IACV,wEAAwE;IACxE,QAAQ,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,oDAAoD;AACpD,MAAM,UAAU,iBAAiB,CAC/B,IAAsB;IAEtB,OAAO;QACL,oBAAoB,EAAE;YACpB,IAAI,EAAE,IAAI;YACV,MAAM,CAAC,OAAwB;gBAC7B,OAAO;oBACL,QAAQ;wBACN,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;wBAC5C,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;4BAC3D,OAAO,CAAC,MAAM,CAAC;gCACb,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;gCAC3B,SAAS,EAAE,EAAE;gCACb,IAAI,EAAE,EAAE,IAAI,EAAE;6BACf,CAAC,CAAC;wBACL,CAAC,CAAC,CAAC;oBACL,CAAC;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC;AAED,oFAAoF;AACpF,MAAM,CAAC,MAAM,yBAAyB,GAElC,EAAE,2BAA2B,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `corpus/licence` — the licence of each copy a venue corpus stores permits keeping it
|
|
3
|
+
* (docs/design/venue-corpus.md, decisions 3 and 4; docs/rules/corpus/licence.md). OFF by default and
|
|
4
|
+
* in no rule set: the same files are legal in a private repository and illegal in a public one, and
|
|
5
|
+
* the rule cannot tell which it is in. What is judged is `src/domain/corpus-licence.ts`, which asks
|
|
6
|
+
* the table in `src/domain/licence.ts`; this file reads the record through the codec, reads the
|
|
7
|
+
* rule's one option, and reports.
|
|
8
|
+
*
|
|
9
|
+
* ── WHERE IT REPORTS ─────────────────────────────────────────────────────────────
|
|
10
|
+
* On `<papers-root>/venues/<venue>/papers.json`, at the `stored` of the copy each finding is about
|
|
11
|
+
* (the same location technique as `corpus/record`, `spanAt`). A record that does not parse has
|
|
12
|
+
* findings of `corpus/record`'s and none of this rule's.
|
|
13
|
+
*
|
|
14
|
+
* ── THE OPTION ───────────────────────────────────────────────────────────────────
|
|
15
|
+
* `"corpus/licence": ["warn", { "nonCommercial": true }]` in the root `paperlint.json`: the project
|
|
16
|
+
* declares itself non-commercial, which makes a non-commercial licence permit storing. The
|
|
17
|
+
* default is false: paperlint does not assume it.
|
|
18
|
+
*/
|
|
19
|
+
import { type JsonRuleModule } from "./corpus-record-rule.ts";
|
|
20
|
+
import type { VenueCorpusCodec } from "./ports/venue-corpus-codec.ts";
|
|
21
|
+
/** What the rule reads with. */
|
|
22
|
+
export interface CorpusLicenceDeps {
|
|
23
|
+
readonly codec: VenueCorpusCodec;
|
|
24
|
+
}
|
|
25
|
+
/** The rule, reading each record through `deps.codec`. */
|
|
26
|
+
export declare function corpusLicenceRules(deps: CorpusLicenceDeps): Readonly<Record<"licence", JsonRuleModule>>;
|
|
27
|
+
//# sourceMappingURL=corpus-licence-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus-licence-rule.d.ts","sourceRoot":"","sources":["../src/corpus-licence-rule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAMtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGtE,gCAAgC;AAChC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;CAClC;AAoCD,0DAA0D;AAC1D,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,iBAAiB,GACtB,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,CAwB7C"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `corpus/licence` — the licence of each copy a venue corpus stores permits keeping it
|
|
3
|
+
* (docs/design/venue-corpus.md, decisions 3 and 4; docs/rules/corpus/licence.md). OFF by default and
|
|
4
|
+
* in no rule set: the same files are legal in a private repository and illegal in a public one, and
|
|
5
|
+
* the rule cannot tell which it is in. What is judged is `src/domain/corpus-licence.ts`, which asks
|
|
6
|
+
* the table in `src/domain/licence.ts`; this file reads the record through the codec, reads the
|
|
7
|
+
* rule's one option, and reports.
|
|
8
|
+
*
|
|
9
|
+
* ── WHERE IT REPORTS ─────────────────────────────────────────────────────────────
|
|
10
|
+
* On `<papers-root>/venues/<venue>/papers.json`, at the `stored` of the copy each finding is about
|
|
11
|
+
* (the same location technique as `corpus/record`, `spanAt`). A record that does not parse has
|
|
12
|
+
* findings of `corpus/record`'s and none of this rule's.
|
|
13
|
+
*
|
|
14
|
+
* ── THE OPTION ───────────────────────────────────────────────────────────────────
|
|
15
|
+
* `"corpus/licence": ["warn", { "nonCommercial": true }]` in the root `paperlint.json`: the project
|
|
16
|
+
* declares itself non-commercial, which makes a non-commercial licence permit storing. The
|
|
17
|
+
* default is false: paperlint does not assume it.
|
|
18
|
+
*/
|
|
19
|
+
import { spanAt } from "./corpus-record-rule.js";
|
|
20
|
+
import { judgeLicences, licenceMessage, } from "./domain/corpus-licence.js";
|
|
21
|
+
import { rulePageUrl } from "./venue-rules.js";
|
|
22
|
+
/** The option, as ESLint's schema validated it: `nonCommercial` is a boolean or absent. */
|
|
23
|
+
const nonCommercial = (options) => {
|
|
24
|
+
const [first] = options;
|
|
25
|
+
return (typeof first === "object" &&
|
|
26
|
+
first !== null &&
|
|
27
|
+
"nonCommercial" in first &&
|
|
28
|
+
first.nonCommercial === true);
|
|
29
|
+
};
|
|
30
|
+
const META = {
|
|
31
|
+
type: "suggestion",
|
|
32
|
+
docs: {
|
|
33
|
+
description: "each copy a venue corpus stores has a licence that permits keeping that file (opt-in: the same files are legal in a private repository and illegal in a public one)",
|
|
34
|
+
url: rulePageUrl("corpus/licence"),
|
|
35
|
+
},
|
|
36
|
+
schema: [
|
|
37
|
+
{
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: { nonCommercial: { type: "boolean" } },
|
|
40
|
+
additionalProperties: false,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
// One id per kind of refusal, each with the whole text of `licenceMessage`.
|
|
44
|
+
messages: {
|
|
45
|
+
"not-read": "{{text}}",
|
|
46
|
+
unlisted: "{{text}}",
|
|
47
|
+
forbidden: "{{text}}",
|
|
48
|
+
"non-commercial-only": "{{text}}",
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
/** The rule, reading each record through `deps.codec`. */
|
|
52
|
+
export function corpusLicenceRules(deps) {
|
|
53
|
+
return {
|
|
54
|
+
licence: {
|
|
55
|
+
meta: META,
|
|
56
|
+
create(context) {
|
|
57
|
+
return {
|
|
58
|
+
Document() {
|
|
59
|
+
const { text, ast } = context.sourceCode;
|
|
60
|
+
const record = deps.codec.parse(text);
|
|
61
|
+
if (!record.ok)
|
|
62
|
+
return;
|
|
63
|
+
judgeLicences(record.corpus, {
|
|
64
|
+
nonCommercial: nonCommercial(context.options),
|
|
65
|
+
}).forEach((f) => {
|
|
66
|
+
context.report({
|
|
67
|
+
loc: spanAt(ast, f.at),
|
|
68
|
+
messageId: f.refusal.kind,
|
|
69
|
+
data: { text: licenceMessage(f) },
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=corpus-licence-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus-licence-rule.js","sourceRoot":"","sources":["../src/corpus-licence-rule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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AM,CAAC,EAAE;4BAAE,OAAO;wBACvB,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE;4BAC3B,aAAa,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC;yBAC9C,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;4BACf,OAAO,CAAC,MAAM,CAAC;gCACb,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;gCACtB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI;gCACzB,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE;6BAClC,CAAC,CAAC;wBACL,CAAC,CAAC,CAAC;oBACL,CAAC;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -39,6 +39,8 @@ interface JsonDocument {
|
|
|
39
39
|
/** What the rule uses of ESLint's context on a JSON file. */
|
|
40
40
|
export interface JsonRuleContext {
|
|
41
41
|
readonly filename: string;
|
|
42
|
+
/** The options the rule was configured with: what follows its severity in `["warn", { … }]`. */
|
|
43
|
+
readonly options: readonly unknown[];
|
|
42
44
|
readonly sourceCode: {
|
|
43
45
|
readonly text: string;
|
|
44
46
|
readonly ast: JsonDocument;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corpus-record-rule.d.ts","sourceRoot":"","sources":["../src/corpus-record-rule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"corpus-record-rule.d.ts","sourceRoot":"","sources":["../src/corpus-record-rule.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA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AE,YAAY,CAAA;KAAE,CAAC;IAC3E,MAAM,CAAC,CAAC,EAAE;QACR,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;QACnB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;KACjD,GAAG,IAAI,CAAC;CACV;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;CAC7D;AAsBD,4EAA4E;AAC5E,eAAO,MAAM,MAAM,GAAI,KAAK,YAAY,EAAE,MAAM,UAAU,KAAG,IACE,CAAC;AA+ChE,mDAAmD;AACnD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,gBAAgB,GACrB,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAoB5C;AAED,sDAAsD;AACtD,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAC9C,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,CACF,CAAC"}
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
* language (`@eslint/json`): each finding at the field its path names, walked down the file's JSON
|
|
10
10
|
* tree; where the path stops being in the file (a required field left out), at the deepest part
|
|
11
11
|
* that is. A file that is not JSON never reaches the rule: ESLint reports its parse error. A corpus
|
|
12
|
-
* folder without `papers.json` has no file to report on, and this rule says nothing about it
|
|
12
|
+
* folder without `papers.json` has no file to report on, and this rule says nothing about it:
|
|
13
|
+
* `corpus/allowed-files-only` reports it on the root `paperlint.json` (src/corpus-layout-rule.ts).
|
|
13
14
|
*/
|
|
14
|
-
import { dirname, join } from "node:path";
|
|
15
|
+
import { basename, dirname, join } from "node:path";
|
|
15
16
|
import { callerPath } from "./caller-path.js";
|
|
16
17
|
import { corpusMessage, judgeCorpus, } from "./domain/corpus-record.js";
|
|
17
18
|
import { rulePageUrl } from "./venue-rules.js";
|
|
@@ -37,6 +38,7 @@ const visible = (dir, deps) => deps
|
|
|
37
38
|
.toSorted((a, b) => a.localeCompare(b));
|
|
38
39
|
/** The findings about the corpus whose `papers.json` is `file`, holding `text`. */
|
|
39
40
|
const findingsFor = (file, text, deps) => judgeCorpus({
|
|
41
|
+
folder: basename(dirname(file)),
|
|
40
42
|
record: deps.codec.parse(text),
|
|
41
43
|
stored: {
|
|
42
44
|
pdf: visible(join(dirname(file), "pdf"), deps),
|
|
@@ -46,13 +48,14 @@ const findingsFor = (file, text, deps) => judgeCorpus({
|
|
|
46
48
|
const META = {
|
|
47
49
|
type: "suggestion",
|
|
48
50
|
docs: {
|
|
49
|
-
description: "a venue corpus's papers.json is a record, every copy stored in pdf/ and text/ is claimed by one copy in it, and every claimed file is there",
|
|
51
|
+
description: "a venue corpus's papers.json is a record that names its own folder as its venue, every copy stored in pdf/ and text/ is claimed by one copy in it, and every claimed file is there",
|
|
50
52
|
url: rulePageUrl("corpus/record"),
|
|
51
53
|
},
|
|
52
54
|
schema: [],
|
|
53
55
|
// One id per finding, each with the whole text of `corpusMessage`.
|
|
54
56
|
messages: Object.fromEntries([
|
|
55
57
|
"unparsed",
|
|
58
|
+
"venue",
|
|
56
59
|
"unclaimed",
|
|
57
60
|
"missing",
|
|
58
61
|
"twice",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corpus-record-rule.js","sourceRoot":"","sources":["../src/corpus-record-rule.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"corpus-record-rule.js","sourceRoot":"","sources":["../src/corpus-record-rule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,UA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G,OAAO,CAAC,UAAU,CAAC;wBACzC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;4BACtD,OAAO,CAAC,MAAM,CAAC;gCACb,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;gCACtB,SAAS,EAAE,CAAC,CAAC,IAAI;gCACjB,IAAI,EAAE,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE;6BACjC,CAAC,CAAC;wBACL,CAAC,CAAC,CAAC;oBACL,CAAC;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC;AAED,sDAAsD;AACtD,MAAM,CAAC,MAAM,yBAAyB,GAElC,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type LayoutEntry } from "./paper-layout.ts";
|
|
2
|
+
/** The drawing of a corpus's layout: the rule's message and its page. */
|
|
3
|
+
export declare const CORPUS_LAYOUT_TREE: string;
|
|
4
|
+
/** Where a folder goes, and a file of a kind no other cure names. */
|
|
5
|
+
export declare const DIR_CURE = "copies of papers into pdf/ or text/, each claimed in papers.json; saved pages into sources/; notes on one paper into deep-reads/<key>.md";
|
|
6
|
+
export declare const FILE_CURE = "decide by what it is \u2014 copies of papers into pdf/ or text/, each claimed in papers.json; saved pages into sources/; notes on one paper into deep-reads/<key>.md; caveats into MANIFEST.md";
|
|
7
|
+
/** For a stray file, the place its name or extension says, the first match winning. */
|
|
8
|
+
export declare const FILE_CURES: readonly {
|
|
9
|
+
readonly names: readonly string[];
|
|
10
|
+
readonly extensions: readonly string[];
|
|
11
|
+
readonly cure: string;
|
|
12
|
+
}[];
|
|
13
|
+
/** An entry at the top of a corpus that is not one of its names (a folder's ends in a slash), with where it goes. */
|
|
14
|
+
export interface CorpusStray {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly cure: string;
|
|
17
|
+
}
|
|
18
|
+
/** The entries at the top of a corpus that are not part of its layout, in the order given. Pure. */
|
|
19
|
+
export declare const judgeCorpusLayout: (entries: readonly LayoutEntry[]) => readonly CorpusStray[];
|
|
20
|
+
/** Whether a corpus stores copies (`pdf/` or `text/`) and has no `papers.json` to record them. Pure. */
|
|
21
|
+
export declare const storesWithoutRecord: (entries: readonly LayoutEntry[]) => boolean;
|
|
22
|
+
/** The text a stray is reported with; `corpus` is the corpus folder as the reader sees it. */
|
|
23
|
+
export declare const corpusStrayMessage: (corpus: string, s: CorpusStray) => string;
|
|
24
|
+
/** The text a corpus that stores copies without its record is reported with. */
|
|
25
|
+
export declare const unrecordedMessage: (corpus: string) => string;
|
|
26
|
+
/** The files loose at the top of `venues/`, in the order given; a folder there is a corpus. Pure. */
|
|
27
|
+
export declare const judgeVenues: (entries: readonly LayoutEntry[]) => readonly string[];
|
|
28
|
+
/** The text a file loose in `venues/` is reported with; `venues` is the folder as the reader sees it. */
|
|
29
|
+
export declare const looseMessage: (venues: string, name: string) => string;
|
|
30
|
+
//# sourceMappingURL=corpus-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus-layout.d.ts","sourceRoot":"","sources":["../../src/domain/corpus-layout.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAC;AAwB3B,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,EAAE,MAMhC,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,QAAQ,6IACuH,CAAC;AAC7I,eAAO,MAAM,SAAS,mMAAiE,CAAC;AAExF,uFAAuF;AACvF,eAAO,MAAM,UAAU,EAAE,SAAS;IAChC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,EA+BA,CAAC;AAEF,qHAAqH;AACrH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAcD,oGAAoG;AACpG,eAAO,MAAM,iBAAiB,GAC5B,SAAS,SAAS,WAAW,EAAE,KAC9B,SAAS,WAAW,EAOlB,CAAC;AAEN,wGAAwG;AACxG,eAAO,MAAM,mBAAmB,GAAI,SAAS,SAAS,WAAW,EAAE,KAAG,OAED,CAAC;AAKtE,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,GAAG,WAAW,KAAG,MAMtD,CAAC;AAEf,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,KAAG,MAC2S,CAAC;AAK/V,qGAAqG;AACrG,eAAO,MAAM,WAAW,GACtB,SAAS,SAAS,WAAW,EAAE,KAC9B,SAAS,MAAM,EAOK,CAAC;AAExB,yGAAyG;AACzG,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,EAAE,MAAM,MAAM,KAAG,MACmX,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE LAYOUT OF A VENUE CORPUS — what may stand at the top of `<papers-root>/venues/<venue>/`
|
|
3
|
+
* (docs/design/venue-corpus.md, decision 5; docs/rules/corpus/allowed-files-only.md): the record,
|
|
4
|
+
* its caveats, the codes, the stored copies, the deep reads and the pages as they were read. Every
|
|
5
|
+
* other name is reported with where it goes; what the operating system and interpreters leave (the
|
|
6
|
+
* lists `paper-layout.ts` and `repro-layout.ts` never report) is never reported. Only the top is
|
|
7
|
+
* judged: `pdf/` and `text/` are `corpus/record`'s. Pure: the caller lists the folder.
|
|
8
|
+
*/
|
|
9
|
+
import { extname } from "node:path";
|
|
10
|
+
import { leaf, renderTree } from "./layout-tree.js";
|
|
11
|
+
import { IMAGE_EXTENSIONS, OS_FILES, } from "./paper-layout.js";
|
|
12
|
+
import { DATA_EXTENSIONS, NOTE_EXTENSIONS, REPRO_BYPRODUCTS, SCRIPT_EXTENSIONS, TOOL_FILES, } from "./repro-layout.js";
|
|
13
|
+
import { CORPUS_RECORD } from "./venue-corpus.js";
|
|
14
|
+
/** The names a corpus may hold at its top, files then folders, each with what it holds. */
|
|
15
|
+
const FILE_NOTES = [
|
|
16
|
+
[CORPUS_RECORD, "the record: every paper, each copy of it and its licence"],
|
|
17
|
+
["MANIFEST.md", "optional: caveats only, the prose no field holds"],
|
|
18
|
+
["measurements.json", "the codes of L0 and L1, one row per paper, by key"],
|
|
19
|
+
[".gitignore", "optional: keeps the stored copies out of git"],
|
|
20
|
+
];
|
|
21
|
+
const DIR_NOTES = [
|
|
22
|
+
["pdf", "pdf/<key>.pdf, when a copy's licence permits it"],
|
|
23
|
+
["text", "text/<key>.txt and text/<key>.<variant>.txt"],
|
|
24
|
+
["deep-reads", "deep-reads/<key>.md, one per paper read in full"],
|
|
25
|
+
["sources", "the listing and call pages as they were read"],
|
|
26
|
+
];
|
|
27
|
+
/** The drawing of a corpus's layout: the rule's message and its page. */
|
|
28
|
+
export const CORPUS_LAYOUT_TREE = renderTree("<papers-root>/venues/<venue>/", [
|
|
29
|
+
...FILE_NOTES.map(([name, note]) => leaf(name, note)),
|
|
30
|
+
...DIR_NOTES.map(([name, note]) => leaf(`${name}/`, note)),
|
|
31
|
+
]);
|
|
32
|
+
/** Where a folder goes, and a file of a kind no other cure names. */
|
|
33
|
+
export const DIR_CURE = "copies of papers into pdf/ or text/, each claimed in papers.json; saved pages into sources/; notes on one paper into deep-reads/<key>.md";
|
|
34
|
+
export const FILE_CURE = `decide by what it is — ${DIR_CURE}; caveats into MANIFEST.md`;
|
|
35
|
+
/** For a stray file, the place its name or extension says, the first match winning. */
|
|
36
|
+
export const FILE_CURES = [
|
|
37
|
+
{
|
|
38
|
+
names: [],
|
|
39
|
+
extensions: [".pdf"],
|
|
40
|
+
cure: "pdf/<key>.pdf, claimed by its copy in papers.json",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
names: [],
|
|
44
|
+
extensions: [".txt"],
|
|
45
|
+
cure: "text/<key>.txt, claimed by its copy in papers.json",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
names: [],
|
|
49
|
+
extensions: NOTE_EXTENSIONS,
|
|
50
|
+
cure: "MANIFEST.md when it is a caveat about the whole corpus; deep-reads/<key>.md when it is about one paper",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
names: TOOL_FILES,
|
|
54
|
+
extensions: SCRIPT_EXTENSIONS,
|
|
55
|
+
cure: "out of the corpus: the paper's repro/tools/, and the command that runs it into papers.json's `rebuild`",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
names: [],
|
|
59
|
+
extensions: DATA_EXTENSIONS,
|
|
60
|
+
cure: "its rows into papers.json (the papers) or measurements.json (their codes); the list as it was downloaded into sources/",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
names: [],
|
|
64
|
+
extensions: [".html", ".htm", ".mhtml", ...IMAGE_EXTENSIONS],
|
|
65
|
+
cure: "sources/, beside the other pages as they were read",
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
const isAllowed = (e) => OS_FILES.includes(e.name) ||
|
|
69
|
+
REPRO_BYPRODUCTS.includes(e.name) ||
|
|
70
|
+
(e.kind === "dir" ? DIR_NOTES : FILE_NOTES).some(([n]) => n === e.name);
|
|
71
|
+
const fileCure = (name) => FILE_CURES.find((c) => c.names.includes(name) ||
|
|
72
|
+
c.extensions.includes(extname(name).toLowerCase()))?.cure ?? FILE_CURE;
|
|
73
|
+
/** The entries at the top of a corpus that are not part of its layout, in the order given. Pure. */
|
|
74
|
+
export const judgeCorpusLayout = (entries) => entries
|
|
75
|
+
.filter((e) => !isAllowed(e))
|
|
76
|
+
.map((e) => e.kind === "dir"
|
|
77
|
+
? { name: `${e.name}/`, cure: DIR_CURE }
|
|
78
|
+
: { name: e.name, cure: fileCure(e.name) });
|
|
79
|
+
/** Whether a corpus stores copies (`pdf/` or `text/`) and has no `papers.json` to record them. Pure. */
|
|
80
|
+
export const storesWithoutRecord = (entries) => entries.some((e) => e.kind === "dir" && ["pdf", "text"].includes(e.name)) &&
|
|
81
|
+
!entries.some((e) => e.kind === "file" && e.name === CORPUS_RECORD);
|
|
82
|
+
const RULE_LINE = "Rule corpus/allowed-files-only: https://github.com/zernie/paperlint/blob/main/docs/rules/corpus/allowed-files-only.md";
|
|
83
|
+
/** The text a stray is reported with; `corpus` is the corpus folder as the reader sees it. */
|
|
84
|
+
export const corpusStrayMessage = (corpus, s) => [
|
|
85
|
+
`\`${corpus}/${s.name}\` is not one of the names a venue corpus holds. Where it goes: ${s.cure}.`,
|
|
86
|
+
"What a corpus holds (.DS_Store and what interpreters leave, like __pycache__/, are never reported):",
|
|
87
|
+
CORPUS_LAYOUT_TREE,
|
|
88
|
+
RULE_LINE,
|
|
89
|
+
].join("\n");
|
|
90
|
+
/** The text a corpus that stores copies without its record is reported with. */
|
|
91
|
+
export const unrecordedMessage = (corpus) => `\`${corpus}/\` stores copies in pdf/ or text/ and has no ${CORPUS_RECORD}, so nothing records which paper each file is a copy of, or under which licence it is kept. What to do: write ${corpus}/${CORPUS_RECORD} (study-accepted-papers writes it; its fields are in papers.schema.json), or remove pdf/ and text/ and keep the papers' ids. ${RULE_LINE}`;
|
|
92
|
+
/** What `venues/` may hold besides its corpus folders: an index and the agent instruction files. */
|
|
93
|
+
const VENUES_FILES = ["README.md", "CLAUDE.md", "AGENTS.md"];
|
|
94
|
+
/** The files loose at the top of `venues/`, in the order given; a folder there is a corpus. Pure. */
|
|
95
|
+
export const judgeVenues = (entries) => entries
|
|
96
|
+
.filter((e) => e.kind === "file" &&
|
|
97
|
+
![...VENUES_FILES, ...OS_FILES, ...REPRO_BYPRODUCTS].includes(e.name))
|
|
98
|
+
.map((e) => e.name);
|
|
99
|
+
/** The text a file loose in `venues/` is reported with; `venues` is the folder as the reader sees it. */
|
|
100
|
+
export const looseMessage = (venues, name) => `\`${venues}/${name}\` is a file loose in venues/, which holds one folder per venue corpus, and ${VENUES_FILES.slice(0, -1).join(", ")} or ${VENUES_FILES.slice(-1).join("")}. Where it goes: into the corpus it is about (caveats into its MANIFEST.md, saved pages into its sources/), or out of venues/ when it serves several (a script into a paper's repro/tools/, its command into each ${CORPUS_RECORD}'s \`rebuild\`). ${RULE_LINE}`;
|
|
101
|
+
//# sourceMappingURL=corpus-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus-layout.js","sourceRoot":"","sources":["../../src/domain/corpus-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,gBAAgB,EAChB,QAAQ,GAET,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,2FAA2F;AAC3F,MAAM,UAAU,GAA2C;IACzD,CAAC,aAAa,EAAE,0DAA0D,CAAC;IAC3E,CAAC,aAAa,EAAE,kDAAkD,CAAC;IACnE,CAAC,mBAAmB,EAAE,mDAAmD,CAAC;IAC1E,CAAC,YAAY,EAAE,8CAA8C,CAAC;CAC/D,CAAC;AACF,MAAM,SAAS,GAA2C;IACxD,CAAC,KAAK,EAAE,iDAAiD,CAAC;IAC1D,CAAC,MAAM,EAAE,6CAA6C,CAAC;IACvD,CAAC,YAAY,EAAE,iDAAiD,CAAC;IACjE,CAAC,SAAS,EAAE,8CAA8C,CAAC;CAC5D,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,MAAM,kBAAkB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AC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,qNAAqN,aAAa,oBAAoB,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type LicenceSettings, type Permission, type StoredKind } from "./licence.ts";
|
|
2
|
+
import type { RecordPath, VenueCorpus } from "./venue-corpus.ts";
|
|
3
|
+
/** What stands against storing one kind of one copy: any permission but the one that allows it. */
|
|
4
|
+
export type Refusal = Exclude<Permission, {
|
|
5
|
+
readonly kind: "permitted";
|
|
6
|
+
}>;
|
|
7
|
+
/**
|
|
8
|
+
* The kinds of one copy that one refusal stands against, with `at`, the copy's `stored` in `papers.json`.
|
|
9
|
+
* A copy whose kinds are refused for the same reason is one finding naming them all; ND, which
|
|
10
|
+
* refuses one kind and not the other, gives one finding for that kind.
|
|
11
|
+
*/
|
|
12
|
+
export interface LicenceFinding {
|
|
13
|
+
readonly at: RecordPath;
|
|
14
|
+
readonly key: string;
|
|
15
|
+
readonly licence: string;
|
|
16
|
+
readonly stored: readonly [StoredKind, ...StoredKind[]];
|
|
17
|
+
readonly refusal: Refusal;
|
|
18
|
+
}
|
|
19
|
+
/** Every refusal of every copy, with the stored kinds it stands against, in the record's order. */
|
|
20
|
+
export declare const judgeLicences: (corpus: VenueCorpus, settings: Readonly<LicenceSettings>) => readonly LicenceFinding[];
|
|
21
|
+
/** The text of a finding: what is wrong, then what to do. */
|
|
22
|
+
export declare function licenceMessage(f: LicenceFinding): string;
|
|
23
|
+
//# sourceMappingURL=corpus-licence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus-licence.d.ts","sourceRoot":"","sources":["../../src/domain/corpus-licence.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAQ,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEvE,mGAAmG;AACnG,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC,CAAC;AAE1E;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,UAAU,EAAE,GAAG,UAAU,EAAE,CAAC,CAAC;IACxD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AA6BD,mGAAmG;AACnG,eAAO,MAAM,aAAa,GACxB,QAAQ,WAAW,EACnB,UAAU,QAAQ,CAAC,eAAe,CAAC,KAClC,SAAS,cAAc,EAUvB,CAAC;AAOJ,6DAA6D;AAC7D,wBAAgB,cAAc,CAAC,CAAC,EAAE,cAAc,GAAG,MAAM,CAiBxD"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `corpus/licence`'s judgement of one venue corpus (docs/design/venue-corpus.md, decisions 3 and 4;
|
|
3
|
+
* docs/rules/corpus/licence.md): whether the licence of each copy permits keeping each kind it
|
|
4
|
+
* stores. Pure: the record, already parsed by the codec, and the one setting in; the findings out.
|
|
5
|
+
* What a licence permits is the table in `licence.ts`, asked here and never copied.
|
|
6
|
+
*/
|
|
7
|
+
import { groupBy } from "remeda";
|
|
8
|
+
import { storedAt } from "./corpus-record.js";
|
|
9
|
+
import { permits, } from "./licence.js";
|
|
10
|
+
/** The stored kinds of `copy` its licence refuses, in its `stored` order. */
|
|
11
|
+
const refusedKinds = (copy, settings) => copy.stored.flatMap((stored) => {
|
|
12
|
+
const refusal = permits(copy.licence.id, stored, settings);
|
|
13
|
+
return refusal.kind === "permitted" ? [] : [{ stored, refusal }];
|
|
14
|
+
});
|
|
15
|
+
/** The refusals of one copy, one per reason (two refusals that print the same message are one), each with its kinds. */
|
|
16
|
+
const byReason = (refused) => Object.values(groupBy(refused, (r) => JSON.stringify(r.refusal))).map(([first, ...rest]) => ({
|
|
17
|
+
stored: [first.stored, ...rest.map((r) => r.stored)],
|
|
18
|
+
refusal: first.refusal,
|
|
19
|
+
}));
|
|
20
|
+
/** Every refusal of every copy, with the stored kinds it stands against, in the record's order. */
|
|
21
|
+
export const judgeLicences = (corpus, settings) => corpus.papers.flatMap((p, paper) => p.copies.flatMap((c, copy) => byReason(refusedKinds(c, settings)).map((r) => ({
|
|
22
|
+
at: storedAt(paper, [copy]),
|
|
23
|
+
key: p.key,
|
|
24
|
+
licence: c.licence.id,
|
|
25
|
+
...r,
|
|
26
|
+
}))));
|
|
27
|
+
const FILE = {
|
|
28
|
+
pdf: "pdf/<key>.pdf",
|
|
29
|
+
text: "text/<key>.txt",
|
|
30
|
+
};
|
|
31
|
+
/** The text of a finding: what is wrong, then what to do. */
|
|
32
|
+
export function licenceMessage(f) {
|
|
33
|
+
const kinds = f.stored.map((k) => `\`${k}\``).join(" and ");
|
|
34
|
+
const files = f.stored.map((k) => `\`${FILE[k]}\``).join(", ");
|
|
35
|
+
const quoted = f.stored.map((k) => `\`"${k}"\``).join(" and ");
|
|
36
|
+
const it = f.stored.length === 1 ? "it" : "them";
|
|
37
|
+
const what = `a copy of \`${f.key}\` stores ${kinds} (${files})`;
|
|
38
|
+
const remove = `remove ${f.stored.length === 1 ? "the file" : "the files"} and ${quoted} from that copy's \`stored\`, and keep the paper's ids`;
|
|
39
|
+
switch (f.refusal.kind) {
|
|
40
|
+
case "not-read":
|
|
41
|
+
return `${what}, and no licence was read for that copy (\`NOASSERTION\`). What to do: record the licence and where it was read (\`licence.id\`, \`read_from\`, \`read_on\`), or ${remove}`;
|
|
42
|
+
case "unlisted":
|
|
43
|
+
return `${what} under \`${f.refusal.id}\`, and the licence table does not list that id, so it permits nothing. What to do: correct the id if it is misspelt; otherwise ${remove}`;
|
|
44
|
+
case "forbidden":
|
|
45
|
+
return `${what} under \`${f.licence}\`, which does not permit ${it}: ${f.refusal.why}. What to do: ${remove}`;
|
|
46
|
+
case "non-commercial-only":
|
|
47
|
+
return `${what} under \`${f.licence}\`, which permits ${it} only in a non-commercial project, and this one has not declared itself one. What to do: if it is one, set \`"corpus/licence": ["warn", { "nonCommercial": true }]\` in the root \`paperlint.json\`; otherwise ${remove}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=corpus-licence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus-licence.js","sourceRoot":"","sources":["../../src/domain/corpus-licence.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EACL,OAAO,GAIR,MAAM,cAAc,CAAC;AAyBtB,6EAA6E;AAC7E,MAAM,YAAY,GAAG,CACnB,IAAoB,EACpB,QAAmC,EACf,EAAE,CACtB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;IAC7B,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3D,OAAO,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AACnE,CAAC,CAAC,CAAC;AAEL,wHAAwH;AACxH,MAAM,QAAQ,GAAG,CACf,OAA2B,EAC4B,EAAE,CACzD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,O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, type RecordPath } from "./venue-corpus.ts";
|
|
|
13
13
|
export declare const CORPORA_DIR = "venues";
|
|
14
14
|
/** What the rule reads of one corpus folder. */
|
|
15
15
|
export interface CorpusFolder {
|
|
16
|
+
/** The corpus folder's name: the venue preset's series, which the record's `venue` must repeat. */
|
|
17
|
+
readonly folder: string;
|
|
16
18
|
/** `papers.json`, as the codec parsed it. */
|
|
17
19
|
readonly record: ParsedCorpus;
|
|
18
20
|
/** The names in `pdf/` and in `text/`, hidden ones left out; none when the folder is absent. */
|
|
@@ -27,6 +29,10 @@ export type CorpusFinding = {
|
|
|
27
29
|
} & ({
|
|
28
30
|
readonly kind: "unparsed";
|
|
29
31
|
readonly message: string;
|
|
32
|
+
} | {
|
|
33
|
+
readonly kind: "venue";
|
|
34
|
+
readonly venue: string;
|
|
35
|
+
readonly folder: string;
|
|
30
36
|
} | {
|
|
31
37
|
readonly kind: "unclaimed";
|
|
32
38
|
readonly file: string;
|
|
@@ -44,6 +50,8 @@ export type CorpusFinding = {
|
|
|
44
50
|
});
|
|
45
51
|
/** The key a stored file's name belongs to, or null when the name is not one a copy can store. */
|
|
46
52
|
export declare function storedKey(kind: StoredKind, name: string): string | null;
|
|
53
|
+
/** The `stored` of a paper's copy (`copy` holds its index), as a path. */
|
|
54
|
+
export declare const storedAt: (paper: number, copy: readonly number[]) => RecordPath;
|
|
47
55
|
/** Every finding about one corpus folder; none for a corpus whose record accounts for each copy. */
|
|
48
56
|
export declare const judgeCorpus: (folder: CorpusFolder) => readonly CorpusFinding[];
|
|
49
57
|
/** The text of a finding: what is wrong, then what to do. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corpus-record.d.ts","sourceRoot":"","sources":["../../src/domain/corpus-record.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,UAAU,EAEhB,MAAM,mBA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