Inform or Accommodate?

Should you stop the build when someone breaks your formatting rules? Should you detect and fix them? There were two comments on the previous post: Oliver agreed, and Will didn't:

Instead of raising errors when things like whitespace or tabs occur, why not just modify the file to correct it?

After some reflection I decided that you shouldn't clean up on behalf of others. At best, you take away their feedback loop, at worst you compound the error. They need to know that something is wrong, so they have a chance to improve. But you can make tools to help them clean up their mess:

desc "Turn crap into gold"
task :midas do
  Dir["public/**/*.js"].each do |f|
    next if f.match(/^lib|resources/)
    sh "sed -i '' 's/  /  /g' #{f}"
    sh "sed -i '' 's/ $//' #{f}"
  end
end
DevOps New Zealand