paperlint 20.6.2 → 20.8.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/revision-plan/index.d.ts +17 -0
- package/dist/adapters/revision-plan/index.d.ts.map +1 -0
- package/dist/adapters/revision-plan/index.js +168 -0
- package/dist/adapters/revision-plan/index.js.map +1 -0
- package/dist/domain/paper-layout.d.ts.map +1 -1
- package/dist/domain/paper-layout.js +4 -0
- package/dist/domain/paper-layout.js.map +1 -1
- package/dist/domain/preset-submission-fields.d.ts +15 -0
- package/dist/domain/preset-submission-fields.d.ts.map +1 -0
- package/dist/domain/preset-submission-fields.js +25 -0
- package/dist/domain/preset-submission-fields.js.map +1 -0
- package/dist/domain/revision-plan.d.ts +121 -0
- package/dist/domain/revision-plan.d.ts.map +1 -0
- package/dist/domain/revision-plan.js +15 -0
- package/dist/domain/revision-plan.js.map +1 -0
- package/dist/domain/venue-scope.d.ts +29 -0
- package/dist/domain/venue-scope.d.ts.map +1 -0
- package/dist/domain/venue-scope.js +18 -0
- package/dist/domain/venue-scope.js.map +1 -0
- package/dist/ports/revision-plan-codec.d.ts +7 -0
- package/dist/ports/revision-plan-codec.d.ts.map +1 -0
- package/dist/ports/revision-plan-codec.js +2 -0
- package/dist/ports/revision-plan-codec.js.map +1 -0
- package/dist/preset-merge.d.ts +34 -0
- package/dist/preset-merge.d.ts.map +1 -0
- package/dist/preset-merge.js +89 -0
- package/dist/preset-merge.js.map +1 -0
- package/dist/presets.d.ts +3 -2
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +3 -84
- package/dist/presets.js.map +1 -1
- package/dist/tex-requirements.d.ts +4 -1
- package/dist/tex-requirements.d.ts.map +1 -1
- package/dist/tex-requirements.js +3 -20
- package/dist/tex-requirements.js.map +1 -1
- package/docs/configuration.md +56 -0
- package/docs/layout.md +1 -0
- package/docs/rules/paper/allowed-files-only.md +1 -0
- package/docs/venues.md +6 -4
- package/package.json +2 -1
- package/presets/acl-latex.md +1 -1
- package/presets/langcode-2027.jsonc +106 -0
- package/presets/langcode-2027.md +79 -0
- package/presets/naacl-2027.jsonc +19 -0
- package/presets/naacl-2027.md +42 -0
- package/presets/venue-profile.schema.json +22 -1
- package/scripts/eslint-file-length.mjs +4 -4
- package/scripts/revision-plan-schema.test.ts +39 -0
- package/scripts/revision-plan-schema.ts +17 -0
- package/skills/paper-pipeline/revision-plan.schema.json +619 -0
- package/src/adapters/revision-plan/index.test.ts +207 -0
- package/src/adapters/revision-plan/index.ts +236 -0
- package/src/adapters/revision-plan/schema.test.ts +69 -0
- package/src/domain/paper-layout.test.ts +1 -0
- package/src/domain/paper-layout.ts +4 -0
- package/src/domain/preset-submission-fields.ts +49 -0
- package/src/domain/revision-plan.ts +127 -0
- package/src/domain/venue-scope.test.ts +33 -0
- package/src/domain/venue-scope.ts +39 -0
- package/src/paper-settings-commands.test.ts +1 -1
- package/src/ports/revision-plan-codec.ts +7 -0
- package/src/preset-card-rule.test.ts +2 -0
- package/src/preset-merge.ts +141 -0
- package/src/presets-scope.test.ts +177 -0
- package/src/presets.test.ts +17 -56
- package/src/presets.ts +5 -130
- package/src/tex-requirements.ts +14 -45
- package/src/tex-venue-rules.test.ts +3 -25
- package/src/venue-rules.test.ts +2 -2
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// LangCode 2027 (the First Language and Code Workshop), a workshop at NAACL 2027 — a VENUE preset
|
|
2
|
+
// over the ACL family. The class line and the TeX packages come from acl-latex.jsonc; this file adds
|
|
3
|
+
// what LangCode's call sets. Its card, in prose: `langcode-2027.md` beside this file.
|
|
4
|
+
//
|
|
5
|
+
// Verbatim from https://langcode2027.github.io/submission/ (fetched 2026-11-25):
|
|
6
|
+
// «Long (8 pages), short (4 pages), or a system paper for a shared task (4 pages). References don't count.»
|
|
7
|
+
// «Use the official template as is. Don't change margins, fonts, or spacing.»
|
|
8
|
+
// «Add a Limitations section — Place it after the conclusion. It's required, and it doesn't count toward your pages.»
|
|
9
|
+
// «Make it anonymous — Remove names and affiliations, cite your own work in the third person, and anonymize code links.»
|
|
10
|
+
// «Not counted toward the limit: references, the required Limitations section, the optional
|
|
11
|
+
// Ethical Considerations section, and appendices.»
|
|
12
|
+
// «Subject to change. Deadlines are 11:59 PM UTC-12.»
|
|
13
|
+
// and from https://langcode2027.github.io/ (same day): «Co-located with NAACL 2027», «All accepted
|
|
14
|
+
// papers are archival and appear in the LangCode 2027 proceedings in the ACL Anthology.»
|
|
15
|
+
{
|
|
16
|
+
"type": "venue",
|
|
17
|
+
"name": "LangCode",
|
|
18
|
+
// The call quoted above.
|
|
19
|
+
"url": "https://langcode2027.github.io/",
|
|
20
|
+
"extends": "paperlint:acl-latex",
|
|
21
|
+
|
|
22
|
+
// A workshop (`"workshop": true`): the schema then requires its `parent`, the edition of the
|
|
23
|
+
// conference it is held at, and paperlint refuses a parent of another year.
|
|
24
|
+
"workshop": true,
|
|
25
|
+
|
|
26
|
+
// The conference it is held at: «Co-located with NAACL 2027» (the call above).
|
|
27
|
+
"parent": "paperlint:naacl-2027",
|
|
28
|
+
|
|
29
|
+
// «Make it anonymous — Remove names and affiliations …» (the submission page above).
|
|
30
|
+
"blind": true,
|
|
31
|
+
|
|
32
|
+
// «Add a Limitations section … It's required» (the submission page above). No `position`: the
|
|
33
|
+
// call puts it «after the conclusion», and the optional Ethical Considerations section may follow
|
|
34
|
+
// it, so it need not be the last section.
|
|
35
|
+
"required_sections": [{ "title": "Limitations" }],
|
|
36
|
+
|
|
37
|
+
// What the call says the workshop is for: its headline, and its five areas with their topics
|
|
38
|
+
// (https://langcode2027.github.io/, «We invite submissions across five areas, including but not
|
|
39
|
+
// limited to:»). Each topic is written «<area>: <topic>», the area's heading joined to its line.
|
|
40
|
+
"scope": {
|
|
41
|
+
"url": "https://langcode2027.github.io/",
|
|
42
|
+
"read": "2026-11-25",
|
|
43
|
+
"sentences": [
|
|
44
|
+
"Towards secure, trustworthy, robust, and multilingual code generation.",
|
|
45
|
+
"We invite submissions across five areas, including but not limited to:",
|
|
46
|
+
],
|
|
47
|
+
"topics": [
|
|
48
|
+
"Secure Code Generation: Vulnerability-aware training and decoding",
|
|
49
|
+
"Secure Code Generation: Guardrails: input filtering, output auditing, policy enforcement",
|
|
50
|
+
"Secure Code Generation: Adversarial attacks: jailbreaks, prompt injection, obfuscation",
|
|
51
|
+
"Secure Code Generation: Safety of agentic coding systems",
|
|
52
|
+
"Trustworthiness: Explainability and interpretability of code models",
|
|
53
|
+
"Trustworthiness: Calibration, uncertainty, and hallucination",
|
|
54
|
+
"Trustworthiness: Contamination-aware benchmarks and evaluation",
|
|
55
|
+
"Trustworthiness: Human–CodeLLM and agent alignment",
|
|
56
|
+
"Robustness: Paraphrasing, dialectal variation, and code-mixed prompts",
|
|
57
|
+
"Robustness: Low-resource, emerging, legacy, and domain-specific languages",
|
|
58
|
+
"Robustness: Adaptation to new languages and distribution shift",
|
|
59
|
+
"Multilinguality: Generation, explanation, and documentation from non-English prompts",
|
|
60
|
+
"Multilinguality: Cross-lingual transfer to new natural languages",
|
|
61
|
+
"Multilinguality: Data curation for underrepresented languages",
|
|
62
|
+
"Applications: Efficient code models for low-compute settings",
|
|
63
|
+
"Applications: Deploying code models across languages and communities",
|
|
64
|
+
"Applications: CodeLLMs in computing education",
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
// The call's dates, AoE («11:59 PM UTC-12»), in UTC at the end of the AoE day. No portal
|
|
69
|
+
// reading: the call names OpenReview, and no reading of its deadline was taken.
|
|
70
|
+
"deadlines": [
|
|
71
|
+
{
|
|
72
|
+
"what": "submission",
|
|
73
|
+
"at": "2027-02-06T11:59:59Z",
|
|
74
|
+
"source": "call",
|
|
75
|
+
"url": "https://langcode2027.github.io/submission/",
|
|
76
|
+
"read": "2026-11-25",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"what": "notification",
|
|
80
|
+
"at": "2027-03-27T11:59:59Z",
|
|
81
|
+
"source": "call",
|
|
82
|
+
"url": "https://langcode2027.github.io/submission/",
|
|
83
|
+
"read": "2026-11-25",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"what": "camera-ready",
|
|
87
|
+
"at": "2027-04-17T11:59:59Z",
|
|
88
|
+
"source": "call",
|
|
89
|
+
"url": "https://langcode2027.github.io/submission/",
|
|
90
|
+
"read": "2026-11-25",
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
|
|
94
|
+
"format": {
|
|
95
|
+
// 🔴 THE PAGE LIMITS ARE NOT GATED. The limit counts content only and leaves out «the required
|
|
96
|
+
// Limitations section, the optional Ethical Considerations section», which stand between the
|
|
97
|
+
// conclusion and the references. format/page-limit's body count runs to the references or the
|
|
98
|
+
// appendix, so it would count them as body and report a paper inside the limit (the same
|
|
99
|
+
// measurement as realm-2026.jsonc). The kinds exist so a paper can name its own.
|
|
100
|
+
"kinds": {
|
|
101
|
+
"long": {},
|
|
102
|
+
"short": {},
|
|
103
|
+
"system": {},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "LangCode @ NAACL 2027 — venue card"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# LangCode @ NAACL 2027
|
|
6
|
+
|
|
7
|
+
The card of the venue preset `paperlint:langcode-2027` ([`langcode-2027.jsonc`](langcode-2027.jsonc)):
|
|
8
|
+
what the venue asks for, in prose. The numbers a machine checks live in the preset; the section at
|
|
9
|
+
the end is generated from it.
|
|
10
|
+
|
|
11
|
+
Sources: the call, [langcode2027.github.io](https://langcode2027.github.io/), and its submission
|
|
12
|
+
page, [langcode2027.github.io/submission](https://langcode2027.github.io/submission/), both read
|
|
13
|
+
2026-11-25. The call says «Subject to change»: 🔴 **re-read it before relying on a date.**
|
|
14
|
+
|
|
15
|
+
## The venue (2027, the 1st edition)
|
|
16
|
+
|
|
17
|
+
| field | value |
|
|
18
|
+
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| full name | LangCode 2027, the First Language and Code Workshop, at NAACL 2027 |
|
|
20
|
+
| where and when | «NAACL 2027, June 1–5, 2027, in San Francisco, California, USA»; «One day, in person, hybrid. Authors who cannot travel can present remotely.» |
|
|
21
|
+
| submission | **5 February 2027**, «11:59 PM UTC-12» (= 6 February 11:59 UTC), on OpenReview |
|
|
22
|
+
| ARR commitment | 12 March 2027, for papers already reviewed through ACL Rolling Review |
|
|
23
|
+
| notification | 26 March 2027 |
|
|
24
|
+
| camera-ready | 16 April 2027, «with one extra page» |
|
|
25
|
+
| archival | «All accepted papers are archival and appear in the LangCode 2027 proceedings in the ACL Anthology … There is no non-archival option.» |
|
|
26
|
+
| blind | **double-blind**: «Remove names and affiliations, cite your own work in the third person, and anonymize code links.» |
|
|
27
|
+
| template | ACL: «Use the official template as is. Don't change margins, fonts, or spacing.» |
|
|
28
|
+
| required section | **Limitations**: «Place it after the conclusion. It's required, and it doesn't count toward your pages.» |
|
|
29
|
+
|
|
30
|
+
## What the workshop is for
|
|
31
|
+
|
|
32
|
+
The call's headline: «Towards secure, trustworthy, robust, and multilingual code generation.» Its
|
|
33
|
+
five areas, «including but not limited to», are Secure Code Generation, Trustworthiness,
|
|
34
|
+
Robustness, Multilinguality and Applications; each area's topics are in the preset's `scope`,
|
|
35
|
+
verbatim.
|
|
36
|
+
|
|
37
|
+
## Paper kinds and limits
|
|
38
|
+
|
|
39
|
+
| kind | at submission | at camera-ready | not counted |
|
|
40
|
+
| -------- | ------------: | --------------: | ----------------------------------------------------------------------------------------------------------- |
|
|
41
|
+
| `long` | 8 pages | 9 pages | «references, the required Limitations section, the optional Ethical Considerations section, and appendices» |
|
|
42
|
+
| `short` | 4 pages | 5 pages | the same |
|
|
43
|
+
| `system` | 4 pages | 5 pages | the same; «Only teams that took part in the Test phase can submit one.» |
|
|
44
|
+
|
|
45
|
+
🔴 **The page limits are not gated.** `format/page-limit` counts the body up to the references or
|
|
46
|
+
the appendix, so it would count the Limitations and Ethical Considerations sections as body and
|
|
47
|
+
report a paper inside the limit (the same measurement as [REALM 2026](realm-2026.md)).
|
|
48
|
+
|
|
49
|
+
## What the preset encodes
|
|
50
|
+
|
|
51
|
+
- **The template**, through `extends: paperlint:acl-latex` ([`acl-latex.md`](acl-latex.md)): the
|
|
52
|
+
class line and the TeX packages.
|
|
53
|
+
- **Double-blind review** (`blind`): `anonymity/identity` looks for the paper's own identity in the
|
|
54
|
+
PDF.
|
|
55
|
+
- **The Limitations section** (`required_sections`): `tex/required-section` reports a paper without
|
|
56
|
+
`\section{Limitations}` or `\section*{Limitations}`.
|
|
57
|
+
- **The deadlines**, from the call, in UTC.
|
|
58
|
+
- **The scope**: the headline and the topics above, verbatim, for a reader; no rule judges a paper
|
|
59
|
+
against them.
|
|
60
|
+
- **The parent conference**, `"workshop": true` and `"parent": "paperlint:naacl-2027"`
|
|
61
|
+
([`naacl-2027.md`](naacl-2027.md)): «NAACL 2027» counts as a LangCode paper's own conference.
|
|
62
|
+
|
|
63
|
+
## Not verified
|
|
64
|
+
|
|
65
|
+
- The OpenReview group's address and its form's fields: not read, so the preset names no portal.
|
|
66
|
+
- Whether the Ethical Considerations section is required: the call calls it «optional».
|
|
67
|
+
|
|
68
|
+
## What the preset resolves to
|
|
69
|
+
|
|
70
|
+
<!-- paperlint:preset-rules -->
|
|
71
|
+
<!-- prettier-ignore-start -->
|
|
72
|
+
<!-- Generated from langcode-2027.jsonc by `npx eslint --fix` (rule preset/card-rules). Edit the preset, not this section. -->
|
|
73
|
+
|
|
74
|
+
**`paperlint:langcode-2027`** — venue preset for LangCode 2027 · call for papers: <https://langcode2027.github.io/> · extends `paperlint:acl-latex`
|
|
75
|
+
|
|
76
|
+
No preset of this chain sets a rule: under it, every rule keeps paperlint's default.
|
|
77
|
+
|
|
78
|
+
<!-- prettier-ignore-end -->
|
|
79
|
+
<!-- /paperlint:preset-rules -->
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// NAACL 2027 (the Annual Conference of the Nations of the Americas Chapter of the ACL) — a MINIMAL
|
|
2
|
+
// venue preset: the conference LangCode 2027 is held at, so the workshop can name it as its
|
|
3
|
+
// `parent`. It carries the edition's names and its template family, and no page limit. Its card:
|
|
4
|
+
// `naacl-2027.md`.
|
|
5
|
+
//
|
|
6
|
+
// Verbatim from https://2027.naacl.org/calls/main_conference_papers/ (fetched 2026-11-25): «NAACL
|
|
7
|
+
// 2027 will take place in San Francisco, California, USA, from June 1 to June 5, 2027.», «Both long
|
|
8
|
+
// and short paper submissions should follow all of the ARR submission requirements and policies,
|
|
9
|
+
// including: Long Papers (8 pages) and Short Papers (4 pages)».
|
|
10
|
+
{
|
|
11
|
+
"type": "venue",
|
|
12
|
+
"name": "NAACL",
|
|
13
|
+
// The call quoted above.
|
|
14
|
+
"url": "https://2027.naacl.org/calls/main_conference_papers/",
|
|
15
|
+
"extends": "paperlint:acl-latex",
|
|
16
|
+
|
|
17
|
+
// What the conference is called in a paper's text (tex/venue-leftover).
|
|
18
|
+
"aliases": ["NAACL"],
|
|
19
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "NAACL 2027 — venue card"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# NAACL 2027
|
|
6
|
+
|
|
7
|
+
The card of the venue preset `paperlint:naacl-2027` ([`naacl-2027.jsonc`](naacl-2027.jsonc)).
|
|
8
|
+
|
|
9
|
+
🔴 **Only the format is checked.** This preset is minimal: it exists so
|
|
10
|
+
[LangCode 2027](langcode-2027.md), the workshop paperlint ships, can name the conference it is held
|
|
11
|
+
at as its `parent`. It carries the edition's names and its template family, ACL
|
|
12
|
+
([`acl-latex.md`](acl-latex.md)), and no page limit, no deadline and no portal: NAACL's papers are
|
|
13
|
+
reviewed through ACL Rolling Review, whose rules paperlint does not encode yet. A paper for the main
|
|
14
|
+
conference gets the ACL class line and TeX packages checked, and nothing the call sets.
|
|
15
|
+
|
|
16
|
+
## The edition
|
|
17
|
+
|
|
18
|
+
- **The call**:
|
|
19
|
+
[2027.naacl.org/calls/main_conference_papers](https://2027.naacl.org/calls/main_conference_papers/),
|
|
20
|
+
read 2026-11-25: «NAACL 2027 will take place in San Francisco, California, USA, from June 1 to
|
|
21
|
+
June 5, 2027.», «Both long and short paper submissions should follow all of the ARR submission
|
|
22
|
+
requirements and policies, including: Long Papers (8 pages) and Short Papers (4 pages)».
|
|
23
|
+
- **Not encoded**: the page limits above, and «Final versions of accepted papers will be given one
|
|
24
|
+
additional page of content (up to 9 pages for long papers, up to 5 pages for short papers)».
|
|
25
|
+
|
|
26
|
+
## Names
|
|
27
|
+
|
|
28
|
+
`NAACL`: in a LangCode 2027 paper, «NAACL 2027» is the paper's own conference; in another venue's
|
|
29
|
+
paper it is reported once, as NAACL.
|
|
30
|
+
|
|
31
|
+
## What the preset resolves to
|
|
32
|
+
|
|
33
|
+
<!-- paperlint:preset-rules -->
|
|
34
|
+
<!-- prettier-ignore-start -->
|
|
35
|
+
<!-- Generated from naacl-2027.jsonc by `npx eslint --fix` (rule preset/card-rules). Edit the preset, not this section. -->
|
|
36
|
+
|
|
37
|
+
**`paperlint:naacl-2027`** — venue preset for NAACL 2027 · call for papers: <https://2027.naacl.org/calls/main_conference_papers/> · extends `paperlint:acl-latex`
|
|
38
|
+
|
|
39
|
+
No preset of this chain sets a rule: under it, every rule keeps paperlint's default.
|
|
40
|
+
|
|
41
|
+
<!-- prettier-ignore-end -->
|
|
42
|
+
<!-- /paperlint:preset-rules -->
|
|
@@ -132,6 +132,26 @@
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
|
+
"scope": {
|
|
136
|
+
"description": "What the call for papers says the venue is for, VERBATIM: its scope sentences and, where the call gives one, its topic list, with the page they were read from and the day. Data for a reader, so a review can judge the paper against the venue's own words; no rule judges a paper against it. A child preset's value replaces its parent's; a workshop does not inherit its parent conference's scope. A family or the base set has none.",
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": ["url", "read", "sentences"],
|
|
140
|
+
"properties": {
|
|
141
|
+
"url": { "type": "string", "pattern": "^https://[^\\s/]+[^\\s]*$" },
|
|
142
|
+
"read": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
|
|
143
|
+
"sentences": {
|
|
144
|
+
"type": "array",
|
|
145
|
+
"minItems": 1,
|
|
146
|
+
"items": { "type": "string", "minLength": 1 }
|
|
147
|
+
},
|
|
148
|
+
"topics": {
|
|
149
|
+
"type": "array",
|
|
150
|
+
"minItems": 1,
|
|
151
|
+
"items": { "type": "string", "minLength": 1 }
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
135
155
|
"submission_fields": {
|
|
136
156
|
"description": "The fields the edition's submission form asks beyond the title, the abstract, the authors and the PDF, as READ — where (`source`: `portal`, through the portal's API; `form`, copied from the form), from which page and on which day. Read by `paperlint submission`: a paper answers them in its paperlint.json `fields`, checked against these before anything is sent, so an option the form does not offer is refused here instead of dropped by the portal without a word. `fields` maps the portal API's key to its kind: `checkbox` (true or false), `choice` (one of `options`, a dropdown or radio buttons), `checkboxes` (a list of `options`, HotCRP's topics spelled \"Group: Topic\"), `integer` and `number` (within `min` and `max`), `text`, `multiline_text`, `email`, `pc_conflicts` (PC member's email → conflict type), and `document` and `attachments` (file uploads, which paperlint declares but does not send). `required`: the form does not complete without it. A child's value replaces its parent's.",
|
|
137
157
|
"type": "object",
|
|
@@ -556,7 +576,8 @@
|
|
|
556
576
|
"name": false,
|
|
557
577
|
"url": false,
|
|
558
578
|
"parent": false,
|
|
559
|
-
"workshop": false
|
|
579
|
+
"workshop": false,
|
|
580
|
+
"scope": false
|
|
560
581
|
}
|
|
561
582
|
}
|
|
562
583
|
},
|
|
@@ -70,8 +70,8 @@ const legacyCeilings = {
|
|
|
70
70
|
"src/paper-settings-commands.test.ts": 318,
|
|
71
71
|
"src/paper-settings.test.ts": 519,
|
|
72
72
|
"src/pdf-facts.ts": 343,
|
|
73
|
-
"src/presets.test.ts":
|
|
74
|
-
"src/presets.ts":
|
|
73
|
+
"src/presets.test.ts": 1199,
|
|
74
|
+
"src/presets.ts": 404,
|
|
75
75
|
"src/readability.test.ts": 331,
|
|
76
76
|
"src/references.test.ts": 715,
|
|
77
77
|
"src/register-bands.test.ts": 353,
|
|
@@ -89,8 +89,8 @@ const legacyCeilings = {
|
|
|
89
89
|
"src/submission.ts": 1155,
|
|
90
90
|
"src/talk-rules.test.ts": 427,
|
|
91
91
|
"src/talk-rules.ts": 562,
|
|
92
|
-
"src/tex-requirements.ts":
|
|
93
|
-
"src/tex-venue-rules.test.ts":
|
|
92
|
+
"src/tex-requirements.ts": 454,
|
|
93
|
+
"src/tex-venue-rules.test.ts": 2067,
|
|
94
94
|
"src/tex-venue-rules.ts": 615,
|
|
95
95
|
"src/toolchain-mirror.test.mjs": 631,
|
|
96
96
|
"src/toolchain.ts": 605,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `npm run schema:venue-corpus`: the script writes the schema the parser generates, where it is told.
|
|
3
|
+
*/
|
|
4
|
+
import { readFileSync } from "node:fs";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { describe, expect, it } from "vitest";
|
|
8
|
+
import { revisionPlanSchemaText } from "../src/adapters/revision-plan/index.ts";
|
|
9
|
+
import { runNode, useTempDir } from "../test/support.ts";
|
|
10
|
+
|
|
11
|
+
const SCRIPT = join(
|
|
12
|
+
dirname(fileURLToPath(import.meta.url)),
|
|
13
|
+
"revision-plan-schema.ts",
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
describe("revision-plan-schema.ts", () => {
|
|
17
|
+
const dir = useTempDir();
|
|
18
|
+
|
|
19
|
+
it("🔴 writes the generated schema to the file it is given", () => {
|
|
20
|
+
const out = join(dir, "revision-plan.schema.json");
|
|
21
|
+
expect(
|
|
22
|
+
runNode(SCRIPT, [out], { nodeArgs: ["--conditions=paperlint-source"] }),
|
|
23
|
+
).toEqual({ status: 0, stdout: "", stderr: "" });
|
|
24
|
+
expect(readFileSync(out, "utf8")).toBe(revisionPlanSchemaText());
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("no output file, or more than one: the usage, exit 2, nothing written", () => {
|
|
28
|
+
const usage = {
|
|
29
|
+
status: 2,
|
|
30
|
+
stdout: "",
|
|
31
|
+
stderr: "usage: node revision-plan-schema.ts <output-file>\n",
|
|
32
|
+
};
|
|
33
|
+
const opts = { nodeArgs: ["--conditions=paperlint-source"] };
|
|
34
|
+
expect(runNode(SCRIPT, [], opts)).toEqual(usage);
|
|
35
|
+
expect(runNode(SCRIPT, [join(dir, "a"), join(dir, "b")], opts)).toEqual(
|
|
36
|
+
usage,
|
|
37
|
+
);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Regenerates the JSON Schema of a paper's revision-plan.json from the plan's parser
|
|
4
|
+
* (`src/adapters/revision-plan`) into the file it is given. `npm run schema:revision-plan` writes the
|
|
5
|
+
* shipped one (`SCHEMA_FILE`); a test fails until the committed file is the one this writes.
|
|
6
|
+
*
|
|
7
|
+
* Usage: node revision-plan-schema.ts <output-file>
|
|
8
|
+
*/
|
|
9
|
+
import { writeFileSync } from "node:fs";
|
|
10
|
+
import { resolve } from "node:path";
|
|
11
|
+
import { revisionPlanSchemaText } from "#src/adapters/revision-plan/index";
|
|
12
|
+
|
|
13
|
+
const [out, ...rest] = process.argv.slice(2);
|
|
14
|
+
if (out === undefined || rest.length > 0) {
|
|
15
|
+
process.stderr.write("usage: node revision-plan-schema.ts <output-file>\n");
|
|
16
|
+
process.exitCode = 2;
|
|
17
|
+
} else writeFileSync(resolve(out), revisionPlanSchemaText());
|