Adds templating for lint messages and refactors rules to use it

This is purely a superficial code maintenance change. I feel like having templates rather than string concatenation for the lint messages makes the code easier to digest. The disadvantage is that it adds a bit more complexity.

I also refactored some of the repeating error messages into a helper.