fix(rules): align isCodePath with isCodeFile for mts/cts/mjs/cjs/kts/scala/groovy - #9327
Conversation
…scala/groovy isCodePath in advisory.ts fell behind isSourcePath's extension set, so missing-test check-run annotations skipped .mts/.cts/.mjs/.cjs/.kts/.scala/.groovy source files that isCodeFile already classifies as genuine source. Extend the regex to match isSourcePath and add a parity regression test mirroring JSONbored#1576/JSONbored#1599/JSONbored#1620. Closes JSONbored#9322
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-27 13:22:53 UTC
Review summary Nits — 3 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Problem
Closes #9322.
isCodePathinsrc/rules/advisory.tsis meant to mirrorisCodeFilefor check-run annotation gating, but its extension regex still excluded.mts,.cts,.mjs,.cjs,.kts,.scala, and.groovythatisSourcePathalready recognizes — so missing-test annotations were silently skipped for those source files.Fix
Extend
isCodePath's extension list to include the same JVM/JS module extensionsisSourcePathuses.Tests
.mts/.cts/.mjs/.cjs/.kts/.scala/.groovypaths.Reverting the regex extension fails the test.
git diff --checkclean.Validation
vitest run test/unit/rules.test.ts -t 9322Safety