sage
sage copied to clipboard
pre-commit
https://pre-commit.com/
Projects typically provide the pre-commit configuration for developers to opt-in locally.
Some projects additionally run the pre-commit then on each PR and have it commit to the branch. That can be done easily using the GH application https://github.com/marketplace/pre-commit-ci
Here's a simple example that I use locally: https://gist.github.com/grhkm21/6d20ddd7f11b3c00f889349052a43947, as a "sanity check" before CI shouts at me
Relevant PR: https://github.com/sagemath/sage/pull/39085.