Welcome to another installment of the “CodeIt.RightRules Explained” series. If the previous sentence doesn’t mean anything to you, don’t despair?here’s a quick recap.
CodeIt.Right?is one of the SubMain’s offerings. You can think of it as an automated code review tool, which puts it into the category of?static code analyzers. CodeIt.Right checks your source code against a set of rules, which could be the default set or ones customized by you.
In this ongoing series, we focus on the standard, pre-packaged sets for obvious reasons: those are the ones that will apply to everyone. In each installment?of the series, we explain three CodeIt.Right rules so that you know why you should or shouldn’t deactivate the rule when using CodeIt.Right.
Speaking of which, we tend to start these posts with the following sentences:
- Never implement a suggested fix without knowing what makes it a fix.
- Never ignore a suggested fix without understanding what makes it a fix.
Basically, you can condense these two rules into: ?Always understand a suggested fix.? But we prefer to present them as two separate rules to emphasize the choice you have in front of you: ignore the warning or implement a fix. If you decide to ignore the warning, do it only when you understand the implications. If you go for the fix, make sure you know what you’re doing and why implementing the fix benefits your code.
With that out of the way, let’s get to today’s rules.