summaryrefslogtreecommitdiff
path: root/internal/engine/engine_test.go
Commit message (Collapse)AuthorAgeFilesLines
* a file's name is folded once, not once per name testLukasz Kasprzak2 days1-0/+2
| | | | | | | | | | Folding is the expensive half of a name test on a name with diacritics, and every name test of every rule folded the same name again: on Polish names it was most of the matching work. The per-file facts memoise it, which is where one file's work belongs - the object is per file and per goroutine, so no lock. 4000 Polish names, twelve rules with name tests: 0.33s -> 0.13s
* the module path is git.labunix.xyz/krinoLukasz Kasprzak2 days1-2/+2
| | | | | | | | | | | So that go install can find it. cgit serves no go-import meta tag, so nginx answers a ?go-get=1 request for /NAME with one pointing at https://git.labunix.xyz/NAME.git; the alternative was carrying a .git suffix through every import line forever. One sed over the imports, both go.mod files, and the dependency gate's whitelist. Nothing else depends on the path. go install works from the next tag, the first release whose go.mod carries it.
* comments that explain the code, not how it was writtenLukasz Kasprzak2 days1-5/+4
| | | | | | | | | | | | | | | | | | About 340 comments cited the development process: task and plan numbers, fix waves, rulings, reviewers, and the author in the third person with a date. None of that exists outside the work itself, so to a reader it pointed at nothing. Each one now states the engineering reason it was standing in front of; where a comment was provenance and nothing else, it is gone. References to docs/design.md and docs/gui-design.md by section stay: both ship with the repository. The design documents lose their amendment diaries - CHANGELOG.md is that record - and the GUI's says plainly that the window has gone further than the document. Only comments changed. Every .go file was parsed and its code printed with comments stripped, before and after: the two hashes are identical across all 175 files.
* config and engine can load with unsaved textLukasz Kasprzak4 days1-0/+18
|
* check refuses an empty time format; krino.conf(5) corrected from the re-auditLukasz Kasprzak4 days1-0/+2
|
* check refuses placeholders that could never expandLukasz Kasprzak4 days1-0/+38
|
* (matched) is unknown after an undecided rule, so a catch-all leaves an ↵Lukasz Kasprzak5 days1-1/+1
| | | | unreadable file alone
* krino: 0.0.5 — keyword cache, t and d in reviewv0.0.5Lukasz Kasprzak5 days1-17/+16
|
* krino: duplicates are found, never deletedLukasz Kasprzak5 days1-0/+44
| | | | | | | | | A rule combining (duplicate) with a delete action is refused at load, and a file that is a duplicate under any duplicate scope its directory uses gets no delete step from any rule: the plan shows it skipped and the chain continues. A failed duplicate check blocks the delete too. Tests cover (matched), another rule's own condition, a test evaluation skipped, two scopes and a failed check, each checking every copy is still on disk.
* krino: planning — chains, placeholders, conflicts, JSONLukasz Kasprzak7 days1-0/+49
|
* krino: matching — scan, ignore, conditions, extraction, duplicates, ↵Lukasz Kasprzak8 days1-0/+166
explain, dry run