I love my linter.
Like many people, I struggled with splint (the open source c linter) for the longest time, then finally broke down and bought PC-lint. One of my best decisions ever.
PC-lint has been so much easier to set up than splint. Plus, there’s a plug-in to make it easy to use from within MPLAB.
Just get it.
“I mostly write comments for code I haven’t written yet” – @KentBeck
This strikes me as having many of the benefits of TDD without taking so much time or being a distraction from the flow of coding.
It might be very effective to include in these comments notes about how a section of code should be unit tested, almost like tests in pseudocode. If when you write code to handle a corner case, you write pseudotests for it in a comment, you can’t forget to cover those cases in the real tests.