When developing an application in a team not everyone on this team will be equally good developers. Some will be skilled in some things and some in others and some not at all.
As a team working in an agile process you usually have a definition of 'done' to follow. In our DoD it says never to merge code that is not documented and have proper tests. Sometimes though, a feature is so critical to some team member so the code has to be merged without tests. Sometimes a lazy developer might merge and call it a weekend.
A merge like this means that when other team members pull the code, they will receive code that may or may not function properly and since there are no tests it is hard to verify. It can be very cumbersome to walk through that code to make sure it works before the team member can work on their task.
It has happened on several occasions that the code that was committed without tests has been broken by other team members without them noticing.
So my question becomes:
- How would you handle issues like this?
- Does it point to bad planning rather then bad behaviour?
- Who is to "blame" if code that lacks tests is broken?