@roomi-fields/grillhouse 0.30.0 → 0.31.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.
Files changed (129) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +30 -0
  3. package/agents/developpeur.md +0 -1
  4. package/agents/explorateur.md +0 -1
  5. package/agents/questionneur.md +0 -1
  6. package/agents/testwriter.md +0 -1
  7. package/dist/temporal/circuit/client.d.ts +2 -2
  8. package/dist/temporal/circuit/client.js.map +1 -1
  9. package/dist/temporal/circuit/commande.js +4 -4
  10. package/dist/temporal/circuit/commande.js.map +1 -1
  11. package/dist/temporal/circuit/contrat.d.ts +3 -3
  12. package/dist/temporal/circuit/contrat.js +8 -2
  13. package/dist/temporal/circuit/contrat.js.map +1 -1
  14. package/dist/temporal/circuit/deroule.js +3 -3
  15. package/dist/temporal/circuit/deroule.js.map +1 -1
  16. package/dist/temporal/commande.js +5 -6
  17. package/dist/temporal/commande.js.map +1 -1
  18. package/dist/temporal/installation.d.ts +0 -4
  19. package/dist/temporal/installation.js +12 -34
  20. package/dist/temporal/installation.js.map +1 -1
  21. package/docs/ARCHITECTURE.md +49 -19
  22. package/docs/CADRE.md +10 -0
  23. package/docs/INTERFACE.md +8 -3
  24. package/package.json +2 -2
  25. package/scripts/activites.mjs +150 -77
  26. package/scripts/aiguillage.mjs +33 -11
  27. package/scripts/avancement.mjs +27 -10
  28. package/scripts/bilan.mjs +101 -25
  29. package/scripts/cadre.mjs +5 -2
  30. package/scripts/circuit.mjs +153 -57
  31. package/scripts/composants-affectes.mjs +64 -21
  32. package/scripts/composition-des-langages.mjs +5 -3
  33. package/scripts/conformite.mjs +54 -19
  34. package/scripts/dependances-internes.mjs +9 -3
  35. package/scripts/dernier-vert.mjs +54 -19
  36. package/scripts/dette.mjs +32 -11
  37. package/scripts/donnees-cles.mjs +24 -8
  38. package/scripts/droits.mjs +40 -15
  39. package/scripts/empreinte-d-etape.mjs +17 -0
  40. package/scripts/engendres.mjs +15 -5
  41. package/scripts/enveloppe/enveloppe.mjs +141 -48
  42. package/scripts/enveloppe/travail-de-la-copie.mjs +36 -12
  43. package/scripts/faits-du-circuit.mjs +1 -1
  44. package/scripts/flux-des-paquets.mjs +21 -7
  45. package/scripts/gardes-du-cadre.mjs +9 -3
  46. package/scripts/init.mjs +11 -4
  47. package/scripts/integration/file.mjs +84 -29
  48. package/scripts/integration/integrer.mjs +70 -24
  49. package/scripts/integration/rejeu.mjs +26 -9
  50. package/scripts/jointure.d.ts +6 -1
  51. package/scripts/langages/cargo/commandes.mjs +97 -18
  52. package/scripts/langages/cargo/composants.mjs +24 -8
  53. package/scripts/langages/cargo/index.mjs +4 -0
  54. package/scripts/langages/cargo/tests-de-head.mjs +25 -9
  55. package/scripts/langages/python/commandes.mjs +3 -1
  56. package/scripts/langages/python/index.mjs +4 -0
  57. package/scripts/langages/typescript/chemins-des-tests.mjs +6 -2
  58. package/scripts/langages/typescript/composants.mjs +9 -3
  59. package/scripts/langages/typescript/consommateurs-arbitres.mjs +40 -14
  60. package/scripts/langages/typescript/consommateurs.mjs +39 -14
  61. package/scripts/langages/typescript/elements-du-lot.mjs +36 -12
  62. package/scripts/langages/typescript/frontieres.mjs +66 -22
  63. package/scripts/langages/typescript/index-interfaces.mjs +36 -13
  64. package/scripts/langages/typescript/index.mjs +10 -3
  65. package/scripts/langages/typescript/interfaces-contre-code.mjs +109 -41
  66. package/scripts/langages/typescript/lecteurs.mjs +36 -11
  67. package/scripts/langages/typescript/migrations/0.23.0-config-vitest.mjs +15 -5
  68. package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +6 -2
  69. package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +6 -2
  70. package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +3 -1
  71. package/scripts/langages/typescript/parcours.mjs +12 -4
  72. package/scripts/langages/typescript/regle-des-tests.mjs +9 -3
  73. package/scripts/langages/typescript/resumes.mjs +9 -3
  74. package/scripts/langages/typescript/tailles-des-tests.mjs +58 -16
  75. package/scripts/langages/typescript/tests-de-nuit.mjs +3 -1
  76. package/scripts/langages/typescript/tests.mjs +24 -8
  77. package/scripts/langages/typescript/titres-de-tests.mjs +35 -12
  78. package/scripts/langages/typescript/turbo-des-paquets.mjs +152 -51
  79. package/scripts/langages/typescript/verdict.mjs +3 -1
  80. package/scripts/langages/typescript/verifier.mjs +28 -10
  81. package/scripts/langages/typescript/vitest-config/avancement.reporter.mjs +15 -5
  82. package/scripts/langages/typescript/vitest-config/base.mjs +7 -2
  83. package/scripts/langages/typescript/vitest-config/changements.mjs +21 -8
  84. package/scripts/langages/typescript/vitest-config/delais.mjs +9 -3
  85. package/scripts/langages/typescript/vitest-config/duree.classement.mjs +12 -4
  86. package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +17 -6
  87. package/scripts/langages/typescript/vitest-config/lances.mjs +83 -27
  88. package/scripts/langages/typescript/vitest-config/machine.setup.mjs +7 -0
  89. package/scripts/langages/typescript/vitest-config/resultats.mjs +3 -1
  90. package/scripts/lint-des-scripts.mjs +58 -0
  91. package/scripts/mesure/base-de-passe.mjs +117 -25
  92. package/scripts/mesure/pression.mjs +9 -3
  93. package/scripts/migrations/0.23.0-charte-importee.mjs +6 -2
  94. package/scripts/migrations/0.23.0-crochets-de-seance.mjs +25 -8
  95. package/scripts/migrations/0.23.0-marche-du-projet.mjs +18 -6
  96. package/scripts/migrations/0.23.2-copies-du-cadre.mjs +48 -16
  97. package/scripts/migrations/0.24.12-tri-des-decouvertes.mjs +6 -2
  98. package/scripts/migrations/0.25.0-script-des-tests.mjs +15 -5
  99. package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +6 -2
  100. package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +7 -7
  101. package/scripts/nuit.sh +15 -0
  102. package/scripts/outil.mjs +3 -1
  103. package/scripts/outils-cles.mjs +18 -7
  104. package/scripts/paquet-npm.mjs +15 -5
  105. package/scripts/paquets.mjs +12 -4
  106. package/scripts/passe-de-la-machine.mjs +7 -2
  107. package/scripts/places-de-la-machine.mjs +66 -12
  108. package/scripts/preparation.mjs +15 -5
  109. package/scripts/registre.mjs +6 -2
  110. package/scripts/reprise.mjs +66 -0
  111. package/scripts/resultats.mjs +105 -37
  112. package/scripts/seances.mjs +22 -4
  113. package/scripts/services-du-noyau.mjs +1 -0
  114. package/scripts/sous-commandes.mjs +3 -1
  115. package/scripts/style-a-l-ecriture.mjs +48 -17
  116. package/scripts/tableau.mjs +34 -9
  117. package/scripts/taches-du-graphe.mjs +33 -13
  118. package/scripts/ticket-du-circuit.mjs +10 -0
  119. package/scripts/transitions.mjs +141 -24
  120. package/scripts/verrou-de-fichier.mjs +6 -2
  121. package/scripts/verrou-de-machine.mjs +123 -39
  122. package/scripts/verrous/commande.mjs +50 -17
  123. package/scripts/verrous/ticket-du-sous-agent.mjs +9 -3
  124. package/scripts/verrous/verrou.mjs +42 -14
  125. package/skills/explorateur/SKILL.md +7 -1
  126. package/skills/grill/SKILL.md +1 -1
  127. package/skills/mesure/SKILL.md +3 -0
  128. package/skills/relecteur/SKILL.md +1 -1
  129. package/skills/testwriter/SKILL.md +12 -6
@@ -22,7 +22,10 @@
22
22
  // `cwd:` (or `-C`, `--prefix`), starts one of the heavy tools of OUTILS_LOURDS (turbo,
23
23
  // vitest, knip, depcruise, api-extractor), named by a literal argument or a literal path to
24
24
  // its binary, with no `git init` (grillhouse-44b.10.4, Bazel's test-encyclopedia: a test
25
- // that runs the product in a trial project is large). A tool named by a variable, or run by
25
+ // that runs the product in a trial project is large);
26
+ // or it starts a Temporal development server (the literal arguments `'server', 'start-dev'`
27
+ // in a process call of its text or of its test material): a test that mounts a real server
28
+ // is large (grillhouse-4nr.16). A tool named by a variable, or run by
26
29
  // an npm script (`npm run verifier`), escapes the reading and the test stays medium; so
27
30
  // does a call without `cwd` (on the repository);
28
31
  // - medium (`moyen`): it starts a process (it imports `child_process`, `execa` or `zx`), or it
@@ -65,6 +68,8 @@ const APPEL =
65
68
  const GIT = /^['"`]git(?:['"`]|\s)/;
66
69
  /** The heavy tools of the product: a test that starts one in a trial project is large. */
67
70
  export const OUTILS_LOURDS = ['turbo', 'vitest', 'knip', 'depcruise', 'api-extractor'];
71
+ // A Temporal development server started: the literal arguments `'server', 'start-dev'`.
72
+ const SERVEUR_TEMPORAL = /['"`]server['"`]\s*,\s*['"`]start-dev['"`]/;
68
73
  // A temporary directory mounted.
69
74
  const DOSSIER_TEMPORAIRE = /\bmkdtemp(?:Sync)?\b|\btmpdir\b/;
70
75
  // An option of a call that carries the directory the process runs in.
@@ -76,15 +81,20 @@ function appelComplet(texte, debut) {
76
81
  let profondeur = 0;
77
82
  const fin = Math.min(texte.length, debut + 2000);
78
83
  for (let i = debut; i < fin; i++) {
79
- if (texte[i] === '(') profondeur++;
80
- else if (texte[i] === ')' && --profondeur === 0) return texte.slice(debut, i + 1);
84
+ if (texte[i] === '(') {
85
+ profondeur++;
86
+ } else if (texte[i] === ')' && --profondeur === 0) {
87
+ return texte.slice(debut, i + 1);
88
+ }
81
89
  }
82
90
  return texte.slice(debut, fin);
83
91
  }
84
92
  // Whether <texte> mounts a temporary directory and, in a process call carrying `cwd`, `-C` or
85
93
  // `--prefix`, starts a heavy tool named by a literal.
86
94
  function outilLourdEnProjetDEssai(texte) {
87
- if (!DOSSIER_TEMPORAIRE.test(texte)) return false;
95
+ if (!DOSSIER_TEMPORAIRE.test(texte)) {
96
+ return false;
97
+ }
88
98
  return [...texte.matchAll(APPEL)].some(m => {
89
99
  const appel = appelComplet(texte, m.index + m[0].indexOf('('));
90
100
  return OPTION_DE_DOSSIER.test(appel) && OUTIL_LITTERAL.test(appel);
@@ -96,7 +106,9 @@ const TOUT_REEXPORTE = /\bexport\s*\*\s*from\b/;
96
106
  // null for a clause without braces (a namespace, a default), which takes the whole module.
97
107
  function nomsImportes(clause) {
98
108
  const b = /\{([^}]*)\}/.exec(clause);
99
- if (!b) return null;
109
+ if (!b) {
110
+ return null;
111
+ }
100
112
  return b[1]
101
113
  .split(',')
102
114
  .map(p =>
@@ -155,12 +167,30 @@ export function classer(fichier, lire, racine = path.parse(fichier).root, lesMat
155
167
  const vus = new Set();
156
168
  // <f> followed; with <noms>, the names a test imports of it, its re-exports of a whole module
157
169
  // (`export * from`) are followed only to a module that declares one of them.
158
- const suivre = (f, noms = null) => {
159
- const cle = noms ? `${f}#${noms.join(',')}` : f;
160
- if (vus.has(f) || vus.has(cle)) return;
170
+ const lus = new Set();
171
+ let serveur = false;
172
+ const suivre = (f, noms = null, pris = noms) => {
173
+ const cle = noms || pris ? `${f}#${(noms ?? []).join(',')}#${(pris ?? []).join(',')}` : f;
174
+ if (vus.has(f) || vus.has(cle)) {
175
+ return;
176
+ }
161
177
  vus.add(cle);
162
178
  const texte = lire(f) ?? '';
163
- textes.push(texte);
179
+ if (!lus.has(f)) {
180
+ textes.push(texte);
181
+ }
182
+ lus.add(f);
183
+ // The server counts when the part of the file the test takes starts it: the whole file for
184
+ // the test itself or an import without braces, the exports it names otherwise.
185
+ const partie = pris
186
+ ? texte
187
+ .split(/(?=^export\s)/m)
188
+ .filter(c => pris.some(n => declare(c, n)))
189
+ .join('\n')
190
+ : texte;
191
+ if (SERVEUR_TEMPORAL.test(partie)) {
192
+ serveur = true;
193
+ }
164
194
  for (const m of texte.matchAll(IMPORT)) {
165
195
  const spec = m[1] ?? m[2] ?? m[3] ?? m[4];
166
196
  const parSonNom = lesMatieres.find(x => spec === `${x.nom}/test-fixtures`);
@@ -168,15 +198,22 @@ export function classer(fichier, lire, racine = path.parse(fichier).root, lesMat
168
198
  suivre(parSonNom.entree, nomsImportes(m[0]));
169
199
  continue;
170
200
  }
171
- if (!spec?.startsWith('.')) continue;
201
+ if (!spec?.startsWith('.')) {
202
+ continue;
203
+ }
172
204
  const cible = resoudre(f, spec, lire);
173
- if (!cible) continue;
205
+ if (!cible) {
206
+ continue;
207
+ }
174
208
  if (noms && TOUT_REEXPORTE.test(m[0]) && !noms.some(n => declare(lire(cible) ?? '', n))) {
175
209
  continue;
176
210
  }
177
211
  const rel = path.relative(racine, cible).split(path.sep).join('/');
178
- if ((MATIERE.test(rel) || dansUneMatiere(cible)) && !TEST.test(rel)) suivre(cible);
179
- else modules.add(cible);
212
+ if ((MATIERE.test(rel) || dansUneMatiere(cible)) && !TEST.test(rel)) {
213
+ suivre(cible, null, nomsImportes(m[0]));
214
+ } else {
215
+ modules.add(cible);
216
+ }
180
217
  }
181
218
  };
182
219
  suivre(fichier);
@@ -184,7 +221,8 @@ export function classer(fichier, lire, racine = path.parse(fichier).root, lesMat
184
221
  const processus = PROCESSUS.test(tout);
185
222
  const autreQueGit = [...tout.matchAll(APPEL)].some(m => !GIT.test(m[1].trim()));
186
223
  const taille =
187
- processus && ((autreQueGit && DEPOT_D_ESSAI.test(tout)) || outilLourdEnProjetDEssai(tout))
224
+ processus &&
225
+ ((autreQueGit && DEPOT_D_ESSAI.test(tout)) || outilLourdEnProjetDEssai(tout) || serveur)
188
226
  ? 'grand'
189
227
  : processus || modules.size > 1
190
228
  ? 'moyen'
@@ -241,8 +279,12 @@ if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
241
279
  const compte = t => toutes.filter(x => x.taille === t).length;
242
280
  const nuit = toutes.filter(x => x.nuit).length;
243
281
  const { refus, lignes } = trancher(racine, GARDE, verifier(racine));
244
- for (const r of refus) process.stderr.write(`⛔ ${r.message}\n`);
245
- for (const l of lignes) process.stderr.write(`${l}\n`);
282
+ for (const r of refus) {
283
+ process.stderr.write(`⛔ ${r.message}\n`);
284
+ }
285
+ for (const l of lignes) {
286
+ process.stderr.write(`${l}\n`);
287
+ }
246
288
  process.stderr.write(
247
289
  `ℹ️ ${GARDE} : ${toutes.length} fichier(s) de tests, ${compte('petit')} petit(s), ${compte('moyen')} moyen(s), ${compte('grand')} grand(s) ; ${nuit} de nuit ou de banc.\n`
248
290
  );
@@ -66,7 +66,9 @@ export function testsDeNuit(racine) {
66
66
  try {
67
67
  attendreDeLaPlace();
68
68
  } catch (e) {
69
- if (e?.name !== 'AttenteDeLaMachine') throw e;
69
+ if (e?.name !== 'AttenteDeLaMachine') {
70
+ throw e;
71
+ }
70
72
  process.stdout.write(`${e.message}\n`);
71
73
  return e.code;
72
74
  }
@@ -114,7 +114,9 @@ const options = args.filter(a => a.startsWith('-') && a !== '--force');
114
114
  const chemins = args.filter(a => !a.startsWith('-'));
115
115
  // Under the circuit's mark, the tests measured against the last green; `--force` plays them all.
116
116
  const depuis = process.env[DEPUIS_LE_VERT] ? mesure(racine, { tout: force }) : null;
117
- if (depuis) process.stdout.write(`${depuis.ligne}\n`);
117
+ if (depuis) {
118
+ process.stdout.write(`${depuis.ligne}\n`);
119
+ }
118
120
 
119
121
  // One Turborepo run of <args>, VARIABLE set to <tests> (unset without), each task whose
120
122
  // dependencies succeed played to its end; its exit code. While the run names a results directory
@@ -124,7 +126,9 @@ const turbo = (args, tests) => {
124
126
  delete env[TESTS_CIBLES];
125
127
  delete env[CHANGEMENTS];
126
128
  Object.assign(env, depuis?.env ?? {});
127
- if (tests) env[TESTS_CIBLES] = JSON.stringify(tests);
129
+ if (tests) {
130
+ env[TESTS_CIBLES] = JSON.stringify(tests);
131
+ }
128
132
  const resume = env[RESULTATS] ? ['--summarize'] : [];
129
133
  const runs = path.join(racine, '.turbo', 'runs');
130
134
  const avant = new Set(existsSync(runs) ? readdirSync(runs) : []);
@@ -142,7 +146,9 @@ const turbo = (args, tests) => {
142
146
  stdio: 'inherit',
143
147
  env,
144
148
  }).status ?? 1;
145
- if (resume.length) garderLesResumes(racine, avant, env);
149
+ if (resume.length) {
150
+ garderLesResumes(racine, avant, env);
151
+ }
146
152
  return code;
147
153
  };
148
154
 
@@ -167,16 +173,22 @@ const traces = (filtres, noms) => {
167
173
  const cibles = (filtres, passes) => {
168
174
  // `testsCibles` is undefined with no path and no `--force`: the variable then stays unset.
169
175
  const tests = testsCibles({ arguments: passes, force });
170
- if (!enveloppe) return turbo([SCRIPT_DES_TESTS, ...filtres], tests);
176
+ if (!enveloppe) {
177
+ return turbo([SCRIPT_DES_TESTS, ...filtres], tests);
178
+ }
171
179
  // A package the envelope shows read-only arrives built: only the packages it shows in writing
172
180
  // build, as the envelope mounts them (`inscriptible`).
173
181
  const construits = filtres.filter(f => inscriptible(dossiers.get(f.slice('--filter='.length))));
174
182
  if (filtres.length === 0 || construits.length > 0) {
175
183
  const noms = new Set(construits.map(f => f.slice('--filter='.length)));
176
184
  const propres = construits.length ? traces(construits, noms) : { ids: [] };
177
- if (propres.code !== undefined) return propres.code;
185
+ if (propres.code !== undefined) {
186
+ return propres.code;
187
+ }
178
188
  const construction = turbo(['build', ...propres.ids, '--only', ...construits]);
179
- if (construction !== 0) return construction;
189
+ if (construction !== 0) {
190
+ return construction;
191
+ }
180
192
  }
181
193
  return turbo([SCRIPT_DES_TESTS, '--only', ...filtres], tests);
182
194
  };
@@ -203,7 +215,9 @@ const lancer = () => {
203
215
  options.length ? { arguments: options } : undefined
204
216
  );
205
217
  }
206
- if (liste.length === 0) return cibles([], [...chemins, ...options]);
218
+ if (liste.length === 0) {
219
+ return cibles([], [...chemins, ...options]);
220
+ }
207
221
 
208
222
  // The package of the frame that holds each path, the paths made absolute; the refusals.
209
223
  const refus = [];
@@ -233,7 +247,9 @@ const lancer = () => {
233
247
  }
234
248
  }
235
249
  if (refus.length) {
236
- for (const l of refus) process.stderr.write(`${l}\n`);
250
+ for (const l of refus) {
251
+ process.stderr.write(`${l}\n`);
252
+ }
237
253
  return 2;
238
254
  }
239
255
  return cibles(
@@ -88,8 +88,11 @@ function litteral(texte, debut) {
88
88
  } else if (guillemet === '`' && texte[i] === '$' && texte[i + 1] === '{') {
89
89
  let profondeur = 0;
90
90
  do {
91
- if (texte[i] === '{') profondeur++;
92
- else if (texte[i] === '}') profondeur--;
91
+ if (texte[i] === '{') {
92
+ profondeur++;
93
+ } else if (texte[i] === '}') {
94
+ profondeur--;
95
+ }
93
96
  i++;
94
97
  } while (i < texte.length && profondeur > 0);
95
98
  titre += ' ';
@@ -153,7 +156,11 @@ function ressemblance(a, b) {
153
156
  const la = new Set(a.split('\n'));
154
157
  const lb = new Set(b.split('\n'));
155
158
  let commun = 0;
156
- for (const l of la) if (lb.has(l)) commun++;
159
+ for (const l of la) {
160
+ if (lb.has(l)) {
161
+ commun++;
162
+ }
163
+ }
157
164
  return commun / (la.size + lb.size - commun || 1);
158
165
  }
159
166
 
@@ -165,7 +172,9 @@ function ressemblance(a, b) {
165
172
  export function renommesDuLot(racine) {
166
173
  const supprimes = git(racine, ['diff', 'HEAD', '--name-only', '--diff-filter=D', '-z']);
167
174
  const connus = git(racine, ['ls-tree', '-r', '--name-only', 'HEAD', '-z']);
168
- if (supprimes.status !== 0 || connus.status !== 0) return {};
175
+ if (supprimes.status !== 0 || connus.status !== 0) {
176
+ return {};
177
+ }
169
178
  const anciens = supprimes.stdout.split('\0').filter(f => f && TEST.test(f));
170
179
  const avant = new Set(connus.stdout.split('\0'));
171
180
  const nouveaux = testsDuDepot(racine).filter(f => !avant.has(f));
@@ -183,8 +192,10 @@ export function renommesDuLot(racine) {
183
192
  }
184
193
  return anciens.map(a => ({ n, a, s: ressemblance(texte, textesAnciens.get(a)) }));
185
194
  });
186
- for (const { n, a, s } of paires.filter(p => p.s >= 0.5).sort((x, y) => y.s - x.s)) {
187
- if (out[n] || pris.has(a)) continue;
195
+ for (const { n, a } of paires.filter(p => p.s >= 0.5).sort((x, y) => y.s - x.s)) {
196
+ if (out[n] || pris.has(a)) {
197
+ continue;
198
+ }
188
199
  out[n] = a;
189
200
  pris.add(a);
190
201
  }
@@ -201,7 +212,9 @@ export function jugerLesTitres(dette, constats, renommes = {}) {
201
212
  const inscrite = dette?.[GARDE] ?? {};
202
213
  const permis = f => inscrite[f]?.[REGLE]?.count ?? 0;
203
214
  const comptes = new Map();
204
- for (const c of constats) comptes.set(c.fichier, (comptes.get(c.fichier) ?? 0) + 1);
215
+ for (const c of constats) {
216
+ comptes.set(c.fichier, (comptes.get(c.fichier) ?? 0) + 1);
217
+ }
205
218
  const reprises = new Set(Object.values(renommes));
206
219
  const refus = [];
207
220
  for (const [fichier, trouve] of comptes) {
@@ -223,7 +236,9 @@ export function jugerLesTitres(dette, constats, renommes = {}) {
223
236
  }
224
237
  }
225
238
  for (const fichier of Object.keys(inscrite)) {
226
- if (comptes.has(fichier) || reprises.has(fichier) || !permis(fichier)) continue;
239
+ if (comptes.has(fichier) || reprises.has(fichier) || !permis(fichier)) {
240
+ continue;
241
+ }
227
242
  refus.push({
228
243
  fichier,
229
244
  regle: REGLE,
@@ -256,7 +271,9 @@ function main() {
256
271
  const section = dette[GARDE];
257
272
  if (section) {
258
273
  for (const [nouveau, ancien] of Object.entries(renommes)) {
259
- if (section[ancien] && !section[nouveau]) section[nouveau] = section[ancien];
274
+ if (section[ancien] && !section[nouveau]) {
275
+ section[nouveau] = section[ancien];
276
+ }
260
277
  delete section[ancien];
261
278
  }
262
279
  writeFileSync(path.join(racine, FICHIER), `${JSON.stringify(dette, null, 2)}\n`);
@@ -286,12 +303,18 @@ function main() {
286
303
  ],
287
304
  });
288
305
  }
289
- for (const r of refus) process.stderr.write(`⛔ ${r.message}\n`);
290
- for (const l of lignes) process.stderr.write(`${l}\n`);
306
+ for (const r of refus) {
307
+ process.stderr.write(`⛔ ${r.message}\n`);
308
+ }
309
+ for (const l of lignes) {
310
+ process.stderr.write(`${l}\n`);
311
+ }
291
312
  process.stderr.write(
292
313
  `ℹ️ ${GARDE} : ${constats.length} titre(s) nommant un ticket ou un « critère N » ; les tests Rust et Python sont hors du compte.\n`
293
314
  );
294
315
  process.exitCode = refus.length ? 1 : 0;
295
316
  }
296
317
 
297
- if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) main();
318
+ if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
319
+ main();
320
+ }