Skip to content

Commit 4a1260f

Browse files
authored
Remove unnecessary duplicate code formatting implementation (#67)
For reasons that are not entirely clear, the code to format Technique sources was almost entirely duplicated in the problem module used to embellish code snippets used in examples when printing error messages. Clean up this duplication. Along the way made some improvements to the way tagging of fragments is done by the formatter code, considerably reducing the amount of allocation being done. While we have a fairly extensive battery of parsing and formatting tests, the only real way to ensure the overall shape of the output is correct is to have a set of golden tests comparing known-good inputs that must be identical after being formatted. Add a test case which works through any files in _examples/golden/_ and fail if differences are detected.
2 parents 7802449 + 0710512 commit 4a1260f

File tree

12 files changed

+502
-496
lines changed

12 files changed

+502
-496
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
% technique v1
2+
! MIT; © 2024 ACME, Inc
3+
& checklist
4+
5+
make_coffee : Beans -> Coffee

0 commit comments

Comments
 (0)