forked from 0xWheatyz/SPARC
Add ruff (Python) and tsc --noEmit (TypeScript) linting to CI pipeline #749
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?
Context
Roadmap reference: P2 - No linting or type checking in CI
There is no automated linting or type checking in the CI pipeline. Code style and type errors go undetected until runtime.
What to do
lintjob to.gitea/workflows/build.yamlthat runs:ruff check .for Python lintingtsc --noEmitfor TypeScript type checking in the frontend directoryruffto the Python dev dependencies (e.g.,requirements-dev.txtorpyproject.toml)ruffortscerrors before merging (or baseline-ignore them with inline suppressions if they are pre-existing and out of scope)buildjob should depend onlintpassingAcceptance criteria
ruff check .runs in CI and fails the build on Python lint errorstsc --noEmitruns in CI and fails the build on TypeScript type errorsResolved. CI workflow runs
ruff check SPARC/ tests/andnpx tsc --noEmitin thetestjob. Both checks gate the build.