1) Developer is at a junior level
- Mentor; be kind & gentle. Explain the need for standards in general and then explain the need for the particular standard which is not being followed. Do this with an open mind; if you cannot justify the standard then perhaps it ought not to be a standard?
2) Developer is at a peer level
- this ought to be easy enough – if you can keep it technical and not let is dissolve into a clash of personalities. Again, if you can justify it, it probably ought to be a standard, but if he has an equally compelling argument against, then maybe not. However, do not accept that there ought to be no standard. Ask him for a suggested standard to replace the one which he does not like. If he will not comply, then escalate. If you don’t like it, then put it to the vote/ escalate. Try to avoid escalation, but try to ensure that there is a standard.
3) Developer is at a senior level
Try to reason. Listen carefully, he may be right. If in doubt, then put it to the vote/ escalate.
Caveat: standards are nice (imo, absolutely required, but ymmv), but they are difficult to “enforce” unless reached by consensus.
Exception: “cowboy coders” need to be slapped down hard; no expectations.
Do not feel bad about “tattling” to the boss. When it comes to a cowboy coder then follow the cowboy motto “this team ain’t big enough for both of us”; either he stops cowboying or one of you has to get the hell out of Dodge.