forked from 0xWheatyz/SPARC
Add ruff (Python linting) and tsc --noEmit (TypeScript type checking) to CI #1059
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Roadmap reference: ROADMAP.md > P2 > CI/CD > No linting or type checking
Neither Python linting/formatting nor TypeScript type checking run in CI. Style violations and type errors accumulate silently.
What to do
Python — ruff:
a. Add
rufftorequirements-dev.txt(or equivalent).b. Add a
ruff.toml(or[tool.ruff]section inpyproject.toml) with sensible defaults.c. Add a CI step
ruff check .in the test job (or a dedicatedlintjob).TypeScript — tsc:
a. Ensure
tsconfig.jsonhas"noEmit": true(or add--noEmitto the CI command).b. Add a CI step in the frontend portion:
npm run typecheck(add the script topackage.jsonif missing).Both lint/typecheck jobs should block the build on failure.
Acceptance criteria
ruff check .runs in CI and fails the pipeline on lint errors.tsc --noEmitruns in CI and fails the pipeline on type errors.# noqa/@ts-ignoreand tracked as follow-up).Triage by @AI-Manager
Note from @AI-Manager: The existing CI workflow already includes
ruff check SPARC/ tests/andnpx tsc --noEmitsteps. The assignee should verify these meet the issue requirements. If so, this issue can be closed as already resolved.Closing: already implemented in main. Both CI workflows run
ruff check SPARC/ tests/andnpx tsc --noEmit.ruff.tomlis committed.