Review and Annotate the Code
Fix the Code
In essence, DO NOT become this annoying guy we all know who just changes whitespaces or brace styles based on a personal preference but without regard for the consistency with the rest of the codebase, and who even goes so far as to break builds while fixing minor code violations by introducing simple but deeply hidden bugs.
- DO contact the authors.
- DO discuss your changes with others (not necessarily authors).
- DO request review for your own changes from others; this:
- shows humility,
- invites others to jump onto the bandwagon,
- shows that this is a fluid process.
- DO establish rules and conventions with your co-workers to avoid this issue expanding and crippling the codebase over time.
- DO tackle the matter quickly.
DO ask. Rather than saying "I'm fixing this because X", ask directly "why did you do it this way, and how do you think we can improve it?" If they come up with something better, then start with that and work together on something even better. If they don't, then make a suggestion. If they come up with something better, or don't see why it was wrong, then explain and ask the second question again.
Make it a Team Effort
Your team is more likely to jump onto the bandwagon if they actually take part to this. If this is a large project with a somewhat aging codebase, it's likely that they also dislike the state of rot the code is in, but maybe never bothered to do something about it.
If you have the power (or support of the ones who do), it can be a good idea to organize small sprints dedicated to enhancing code quality. Setting up code analyzers to detect code smells and monitoring their steady decrease while you refactor is also fairly motivational for a team.
Of course, that might be a bit harder for remote teams, as it's a bit more difficult to convey enthusiasm about such things without actually working together.
It pretty much all comes down to that.
Also, don't confuse "politically correct" with "diplomatic":
- The former is about beating around the bush to not offend people while saying something most likely to be negative.
- The latter is about tackling issues while not offending people because there might be some emotional context.
They're very different things.