chore(backend): ruff lint ratchet + CI gate; dedupe email-validator (#193, #194)#223
Conversation
…or (#193, #194) #193: backend had no linter. Add ruff with the default correctness rule set (E4/E7/E9/F), gated in CI (ruff check .). Mirrors the frontend ESLint ratchet (#212): the 94 pre-existing violations are baselined in ruff.toml per-file-ignores, so the check is green today and any NEW violation — a new file, or a new rule category in an existing file — fails CI. The baseline can only shrink. Formatting (ruff format) is intentionally left un-gated: enabling it would require a one-shot reformat of the whole backend that would collide with every in-flight PR. Line-length / style stays the formatter's job, run manually for now. Updated the CLAUDE.md lint TODO accordingly. #194: email-validator was listed twice (runtime dep + under # Testing). Removed the duplicate; it now appears once.
|
Warning Review limit reached
More reviews will be available in 39 minutes and 14 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
frontend | 0f630d2 | Commit Preview URL Branch Preview URL |
Jun 13 2026, 04:01 AM |
Closes #193, closes #194.
#193 — backend linter ratchet
The backend had no linter/formatter (CLAUDE.md admitted it with a
# TODO). Adds ruff as a true ratchet, mirroring the frontend ESLint baseline (#212):backend/ruff.tomlenforces ruff's default correctness set — E4 (import placement), E7 (statement errors), E9 (syntax), F (pyflakes: unused imports/vars, undefined names).[lint.per-file-ignores], soruff check .is green today.F821in the E402-only-baselinedmain.pyfails. The baseline can only shrink.ruff check .), andruffadded torequirements.txt. CLAUDE.md lint TODO updated.Formatting deliberately not gated:
ruff formatwould require a one-shot reformat of the whole backend that would collide with every in-flight PR. Per the brief, I kept it check-only / baselined (the conflict-free option) — line-length (E501) and other pure-style rules stay the formatter's job, run manually for now. This means there's no source-file diff in this PR (onlyruff.toml,requirements.txt,ci.yml,CLAUDE.md), so it does not collide with the in-flight security PRs.Most baseline entries are
F401/F841(dead imports/vars) — safe for a future PR to burn down.#194 — folded in
email-validatorwas listed twice (runtime dep + under# Testing). Removed the duplicate; it appears once.