Repository navigation
Add local CodeFactor parity lint tooling - #383
Conversation
Add pnpm lint as a local CodeFactor parity gate backed by ESLint maintainability rules, jscpd duplicate reporting, and the existing static quality profile. Wire the lint gate into CI, document the workflow, lock the new dev tooling, regenerate the pm-changelog output, and close/release the CodeFactor complexity/duplication/parity PM items with verification evidence. Verification: pm test pm-6sqo --run --progress; pnpm lint; focused workflow/release contract tests; pnpm typecheck; pnpm quality:static; pnpm contracts:check; pnpm security:scan; pnpm audit --audit-level moderate; pnpm changelog:pm:check; node scripts/run-tests.mjs coverage (100/100/100/100); npm pack --dry-run; package doctor; pm health; Sentry/telemetry gate; isolated temp smokes.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Reviewer's GuideAdds a new pnpm lint command that reproduces CodeFactor maintainability, complexity, and duplication checks locally, wires it into CI and release documentation, and locks in the required ESLint/jscpd tooling and workflow contracts. Flow diagram for new pnpm lint CodeFactor parity gateflowchart LR
Dev[Developer or CI job]
Dev --> A[pnpm lint]
A --> B[pnpm lint:eslint]
A --> C[pnpm lint:duplicates]
A --> D[pnpm lint:codefactor]
B --> E[eslint.config.mjs
CodeFactor maintainability rules]
C --> F[jscpd
.jscpd.json]
D --> G[static-quality-gate.mjs
--max-complexity 260
--duplicate-window 24
--max-duplicate-chunks 8]
subgraph CI_static_gate[CI static gate]
Dev
end
subgraph Local_CodeFactor_parity[Local CodeFactor parity]
A
B
C
D
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@codex review |
📝 WalkthroughWalkthroughAdds a local lint parity command built from ESLint and jscpd, wires it into CI and release/testing docs, updates integration contracts for the new scripts, and closes related tracker records with resolution and evidence metadata. ChangesLint parity tooling and workflow
Tracker closeout records
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
To use Codex here, create a Codex account and connect to github. |
|
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The static-quality thresholds (e.g.,
--max-complexity 260,--duplicate-window 24,--max-duplicate-chunks 8) are now hard-coded both ineslint.config.mjsand thelint:codefactorscript; consider centralizing these values (e.g., via a small config module or shared constants) so updating CodeFactor parity thresholds only requires a single change. - You’ve added
@eslint/jsand@typescript-eslint/typescript-eslintas devDependencies but the flat config doesn’t currently extend or use any of their recommended rule sets; if the intent is to mirror only CodeFactor’s maintainability rules, you could either remove unused dependencies or explicitly wire in the presets you intend to rely on.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The static-quality thresholds (e.g., `--max-complexity 260`, `--duplicate-window 24`, `--max-duplicate-chunks 8`) are now hard-coded both in `eslint.config.mjs` and the `lint:codefactor` script; consider centralizing these values (e.g., via a small config module or shared constants) so updating CodeFactor parity thresholds only requires a single change.
- You’ve added `@eslint/js` and `@typescript-eslint`/`typescript-eslint` as devDependencies but the flat config doesn’t currently extend or use any of their recommended rule sets; if the intent is to mirror only CodeFactor’s maintainability rules, you could either remove unused dependencies or explicitly wire in the presets you intend to rely on.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
2 issues found across 18 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Reuse the shared quality:static profile from lint:codefactor and remove the duplicate CI static gate invocation after pnpm lint. Drop the unused @eslint/js dev dependency and update the release/testing contract docs and tests accordingly. Also update pm-fmjy acceptance criteria through pm to reflect the narrowed generated-marker remediation scope and record fresh pm-6sqo review-follow-up evidence.
|
Review follow-up pushed in a68a93c: addressed Sourcery and cubic feedback, removed duplicate CI static work, and updated PM evidence. Please review the current head again.\n\n@codex review\n/gemini review\n@gemini-code-assist\n@coderabbitai full review\n@coderabbitai review\n@sourcery-ai review |
|
To use Codex here, create a Codex account and connect to github. |
|
✅ Action performedFull review finished. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.jscpd.json:
- Around line 10-19: The jscpd ignore list is missing the generated-directory
exclusions that ESLint already applies, so duplicate scanning can still hit
ignored content. Update the .jscpd.json ignore entries to mirror the
generated-dir patterns from eslint.config.mjs, specifically adding the .codex/**
and .gemini/** paths alongside the existing ignores so the lint workflow stays
consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1ecb08c6-58b7-4501-8950-3abbf90734bc
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (17)
.agents/pm/chores/pm-6sqo.toon.agents/pm/history/pm-6sqo.jsonl.agents/pm/history/pm-arzz.jsonl.agents/pm/history/pm-fmjy.jsonl.agents/pm/tasks/pm-arzz.toon.agents/pm/tasks/pm-fmjy.toon.github/workflows/ci.yml.gitignore.jscpd.jsonCHANGELOG.mddocs/RELEASING.mddocs/TESTING.mdeslint.config.mjspackage.jsontests/integration/ci-workflow-contract.spec.tstests/integration/release-automation-contract.spec.tstests/integration/release-readiness-runtime.spec.ts
There was a problem hiding this comment.
1 issue found across 11 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Handle transient EPERM/EBUSY failures from Windows fs.rename during atomic writes by retrying with bounded backoff before cleanup. Covers the PR #383 Windows regression where background test-run record persistence failed on windows-latest with EPERM during rename. PM: pm-2kkl
|
Windows regression follow-up pushed in 68b8631. Changes since the prior review:
Fresh local verification:
@codex review |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
To use Codex here, create a Codex account and connect to github. |
Mirror ESLint generated-directory ignores in jscpd and correct release docs to describe the actual release static quality gate. Addresses CodeRabbit and cubic PR #383 feedback. PM: pm-6sqo
|
Review follow-up pushed in 11be3ca. Addressed current review feedback:
Fresh focused verification:
@codex review |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
To use Codex here, create a Codex account and connect to github. |
|
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! ✅ Action performedFull review finished. |
Release pm-2kkl after PR #383 merged while keeping the item open for scheduled Windows nightly confirmation.
Summary
pnpm lintas a local CodeFactor parity gate: ESLint maintainability rules, jscpd duplicate reporting, and the existing static quality profile.pnpm lintinto the CI static gate and locks the new dev tooling.CHANGELOG.mdwithpm-changelog, and closes the CodeFactor parity/complexity/duplication PM items.Verification
pm test pm-6sqo --run --progresspnpm lintnode scripts/run-tests.mjs test -- tests/integration/ci-workflow-contract.spec.ts tests/integration/release-automation-contract.spec.ts tests/integration/release-readiness-runtime.spec.tspnpm typecheckpnpm quality:staticpnpm contracts:checkpnpm security:scanpnpm audit --audit-level moderatepnpm changelog:pm:checknode scripts/run-tests.mjs coverage-> 256 files, 5133 tests, 100/100/100/100npm pack --dry-run --silentnode dist/cli.js package doctor --project --detail deep --jsonpm health --check-only --summary --jsonnode scripts/release/sentry-telemetry-gate.mjs --json --telemetry-mode best-effort/tmp/tmp.ExXdcpRd86with todos package doctor/tmp/tmp.vRdXivNLZSwith itemtemp-codefactor-lint-zbd9Notes
RELEASE_PATenvironment blocker; no code-side fix is pending in this branch.Summary by Sourcery
Introduce a unified local lint command that mirrors CodeFactor maintainability, complexity, and duplication gates and wire it into the documented and automated release workflow.
New Features:
Enhancements:
Build:
CI:
Documentation:
Tests:
Chores:
Summary by cubic
Adds a local CodeFactor-parity lint gate with
pnpm lintand fixes a Windows atomic write flake by retrying transient rename errors. Aligns jscpd/ESLint generated-directory ignores and updates release docs to reflect the actual static quality gate.New Features
pnpm lintcomposed oflint:eslint,lint:duplicates(jscpd), andlint:codefactor(delegates toquality:static).eslint.config.mjswith CodeFactor-like rules and.jscpd.json(threshold0.35); mirrors ESLint generated-directory ignores in jscpd.pnpm lint(replacesquality:staticstep); updates docs and tests for the new workflow and clarifies the release static gate scope.Bug Fixes
EPERM/EBUSYon Windows duringfs.renameinwriteFileAtomicwith bounded backoff; adds unit tests. Addresses the Windows regression tracked in pm-2kkl.Written for commit 11be3ca. Summary will update on new commits.