Skip to content

Commit fa98e61

Browse files
committed
Enforce more asserts
1 parent 2c977ef commit fa98e61

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/algorithm-format-check.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,15 @@ for (const filename of filenames) {
189189
console.log();
190190
process.exitCode = 1;
191191
}
192+
const assertMatch = step.match(/^\s*(-|[0-9]+\.)\s*Assert([^:])/);
193+
if (assertMatch) {
194+
console.log(
195+
`Bad formatting of '${grammarName}' step (Assert should be immediately followed by ':'; found '${assertMatch[2]}') in '${filename}':`
196+
);
197+
console.dir(step);
198+
console.log();
199+
process.exitCode = 1;
200+
}
192201
}
193202
}
194203
}

0 commit comments

Comments
 (0)