Another favourite of mine is when the production code has checks for something that's injected only for tests. To add insult to injury, those tests are usually called... wait for it... unit tests!
Otherwise, yes, that looks like a sensible rule.
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.