Expand description
Holds line-of-code counters to the rules they declare for themselves.
A case is one small input file with every string and comment in it marked by hand, in a
truth.txt beside it. A dialect is one set of a counter’s rules, written over those
marks: which of them makes a line code, a comment or blank. Reading a case through a dialect
gives the answer that counter should print for that file, and that is what its real answer is
held against.
corpus and dialects read the two, deriver puts them together, adapter runs a
counter’s binary, and verdict compares. shipped writes out the corpus this build
carries, for a project that depends on this crate and has no checkout of it.
Modules§
- adapter
- How to run one counter and read what it prints.
- answer
- What a counter says about one file.
- corpus
- The cases: one small input file each, with its strings and comments marked by hand.
- deriver
- Works out the answer a counter should give, from a case’s marks and that counter’s rules.
- dialects
- The rules that say where each line of a file goes, one set per dialect.
- faults
- Several things wrong at once, which is what reading a corpus or a set of rules finds.
- per_
line - A counter’s own account of where it put every line of a file.
- readings
- The questions two counters are allowed to answer differently.
- recorded
- What a counter printed the last time it was measured, kept so that a change can be noticed.
- shipped
- The corpus this build carries, for a project that depends on the crate and has no checkout.
- truth
- The hand-verified strings and comments of one case, as its
truth.txtwrites them. - verdict
- Runs a counter over the corpus and says, per case, whether it did what its rules say.