This week, we bring you another post in the CodeIt.Right Rules Explained series. In case this is new for you, with each post in the series, I take you through three CodeIt.Right rules in detail. CodeIt.Right is an automated code review tool, making use of static code analysis.
As I always do with these posts, I’ll start with two solid rules of thumb for static analysis.
- Never implement a suggested fix without knowing what makes it a fix.
- Never ignore a suggested fix without understanding what makes it a fix.
And, as I always do, I’ll explain that I don’t phrase it this way to play some sort of game. You might wonder why I don’t just tell you to learn every suggested fix and call it a day.
Well, I phrase it this way to make it clear that you face a specific choice each and every time you encounter an analysis warning: fix it or ignore it. And when you make that choice, you should make it for the right reasons. “I don’t know what this means,” isn’t the right reason. I also approach it this way because trying to learn all of the rules at once would prove extremely daunting.
So let’s dive deep into understanding another three rules today.