- I want to not argue about code appearance and code style after a project has started (maybe before, but prefer the defaults/recommended)
- I don’t want to manually format my code (a file save operation should be enough)
- Repeated mistakes or poor code should be checked by automation
- I want to be sure that every contributor is commiting code that is automatically checked (precommit hook with formatting and linting)
- Code reviews should be about things that can’t be automated (CI should do the rest)
For every commit:
- Suggestions while editing code in an IDE (format, lint, compile, …)
- Format
- Autofix linting errors
- Build (reveals errors in types and compile time errors and warnings)
- Lint (reveals linting errors and warnings)
- Test (reveals failing tests)
- Code review (or for a couple of commits)
From time to time:
- Other tests (smoke, integration, e2e) - might not run for every commit
- Failed deployments (reveals infrastructure related errors)
- Manual testing
All those tools take time to execute. There are alternatives: