Time for yet another deep dive into three more CodeIt.Right Rules. For those of you who don’t know about our CodeIt.Right Rules series, here’s a brief explanation.
CodeIt.Right is one of the tools offered by SubMain. It’s a static code analyzer tool or, more specifically, an automated code review tool. CodeIt.Right works by checking your code against a set of rules and giving you instant feedback on how to solve potential problems. It even offers automatic fixes when applicable.
In each installment on this ongoing series, we explain three CodeIt.Right rules, usually picked from as diverse a category as possible, to showcase the flexibility and breadth of the ruleset.
Readers of this series know that we like to start these posts by stating two things:
- Never implement a suggested fix without knowing what makes it a fix.
- Never ignore a suggested fix without understanding what makes it a fix.
Yeah, you could simplify this down to “always understand a suggested fix.” But I choose to not put it that way since I want you to really think and consider your options. If you decide to ignore a fix, do so understanding the consequences. On the other hand, if you accept a suggested fix, do it with a full understanding of how that’s going to benefit your application.
With all that in mind, let’s get to today’s rules.