mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 08:02:12 +00:00
chore(guards): give the linear-fit guard a match floor and keep SQL out of the i18n scan
The linear-fit guard floored only its walk; it now also requires the implementation's call sites it expects. The per-type readings query aliased its driving relation t, which the i18n call-site scanner read as a translation call; it is mt now, as in readLatestEver.
This commit is contained in:
1 parent
071d23537b
commit
be79603d53
2 files changed
+14
-4
No files matched your search
@@ -57,6 +57,14 @@ describe("one least-squares line", () => {
|
||||
),
|
||||
);
|
||||
expect(offenders).toEqual([]);
|
||||
// The six readers now call the implementation: a sweep that finds fewer
|
||||
// call sites read the wrong tree or lost one.
|
||||
const callers = files.filter((file) =>
|
||||
/\b(?:linearFit|fitFromSums|trendLineByTime)\s*\(/.test(
|
||||
stripComments(readFileSync(join(SRC, file), "utf8")),
|
||||
),
|
||||
);
|
||||
expect(callers.length).toBeGreaterThanOrEqual(7);
|
||||
// The implementation itself matches, so the sweep read real files.
|
||||
expect(
|
||||
HAND_ROLLED_SLOPE.test(
|
||||
|
||||
Reference in new issue
Block a user