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ZIVcdTAwMGWhXFypb0JL71RDuDK3XHUwMDA0sVxuO1x1MDAxMWPf4UZcdTAwMWYhXHUwMDEyw0x5vZRcdTAwMGVZiTf97Fx1MDAxN6H2I3RI9Vx1MDAxZPFa7lxmXHUwMDAxXHUwMDEzjpEkyj5cdTAwMTCdXGLMTl9TNYJEQ2DMkdp8XGK58iZ/iFp587AydStcYs5jtfXpfOs6m3ZYdjE8eXT/RDRNOVvP8uvdm7v/XHUwMDAy1972WSJ9 Code qualityCode style, naming etc.(manual) Code appearanceFormattingtoolCodereviewsAutomatedtestsLintingtoolproblematicproblematic

Ideally…

  • 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)

Process for getting code into good shape

For every commit:

  1. Suggestions while editing code in an IDE (format, lint, compile, …)
  2. Format
  3. Autofix linting errors
  4. Build (reveals errors in types and compile time errors and warnings)
  5. Lint (reveals linting errors and warnings)
  6. Test (reveals failing tests)
  7. Code review (or for a couple of commits)

From time to time:

  1. Other tests (smoke, integration, e2e) - might not run for every commit
  2. Failed deployments (reveals infrastructure related errors)
  3. Manual testing

How to setup

Speed

All those tools take time to execute. There are alternatives:

Decisions