š fix(pariksha): repo rules count grep hits on CRLF lines
Slice: #315
pariksha's repo rules now count a git grep -n hit on a line that ends in a carriage return. parseGrep (packages/pariksha/src/repo-rules.ts) drops one trailing \r before matching and keeps its regex and anchors. A carriage return anywhere else in the line, or a second one at its end, still means no hit. Alok approved this on #315; Cubic first raised it on #297.
What changes for users
deleted-path-still-pinnednow reports a CRLF test file that quotes a path the change deletes or renames.vitest4-inert-pool-confignow reports, on aturbo.jsonchange that leavesVITEST_MAX_WORKERSout of its pass-through, a CRLF caller that hands the variable to turbo.- veda gets no new findings: none of its tracked text files holds a carriage return.
Checks
-
Real git. A scratch repo with a CRLF
a.test.tsquoting'old/path.ts':git grep -nprintsa.test.ts:2:expect('old/path.ts');\r, andsideGrepreturns that one hit, withtextfree of\r, for the tree, the index and a commit. Before the change it returned none. -
Stryker 10.1.1,
taprunner,mutate: ["src/repo-rules.ts"],tap.testFiles: ["src/repo-rules.test.ts"], incremental off:Run Mutants Killed Timeout Survived NoCoverage Before (#297) 297 295 2 0 0 After 301 299 2 0 0 The two Timeouts are the same endless loops as before, which Stryker's hit limit stops.
-
pnpm --filter @veda-hq/pariksha checkis green: 3,910 tests,repo-rules.tsat 100% lines, branches and functions. -
pnpm lintis clean. -
pariksha's version is not bumped; the next release carries it.
š¤ Generated with Claude Code
Summary by cubic
Fixes parseGrep in packages/pariksha so repo rules now count a git grep -n hit on a line ending in a carriage return. Previously . in the regex stopped at \r, so every hit in a CRLF file was dropped, and deleted-path-still-pinned and vitest4-inert-pool-config passed changes they exist to stop.
- Drops one trailing
\rbefore matching, keeping the regex anchors. - A carriage return anywhere else in the line, or a second one at its end, still means no hit.