My Checkin Checklist

Dec 09, 2010 10:41

Here's a simple checklist that I follow before checking code in to a project's source repository.

  1. Does the code pass all tests?
  2. Does the code I'm committing all look relevant to the ticket I'm working on?
  3. Does the code I'm committing conform to the formatting standards of the project?
  4. Am I certain I haven't added whitespace on empty lines or left trailing whitespace anywhere?
  5. Does the code pass all tests?
  6. Check it in.

My process is roughly "write new tests that specify the expected new behaviour, then write the code to make those tests pass." Along the way I have to sort out how this new feature or behaviour will impact existing behaviour or features, adjust those existing tests to suit, and eventually have a complete set of test & feature code that works together. All the while, I'll be running the tests to check what's left to "fix" (the feature I'm adding or behaviour I'm altering being what's "broken" because the new tests are failing).

I might be in the middle of adding a new feature, but I've come far enough to make this edit pass all tests (i.e.: it doesn't break stuff). Committing a change once all current tests pass means I have a fallback position for my next "write a test, write the code to pass the test" spree.

howto, engineers-log, git, subversion, geek, programming, productivity

Previous post Next post
Up