Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Guantanamo is a tool that deletes all code lines that are not covered by tests. I hear you say but what if the removed code actually serves a good purpose? The answer is simple. You can't prove it! According to Guantanamo, all code is guilty until proven innocent. Innocence is proven by test coverage. Consider this sample coverage report by Clover:


Q: What if Guantanamo deletes code that is good, like untested code that actually serves a purpose?
A: You can't prove that it serves a purposeany purpose at all if it isn't excercised by running tests.