> Why not? If the other devs truly don't care, you could take it upon yourself to clean up the code base little by little when you can.
I used to do this simply because it makes the code difficult to read for me to review if for nothing else.
Linters and style check tools only go so far, and bottom line is you have to ship software not write complex and expensive to maintain tooling, so automation beyond a point is not a solution.
The devs ended up relying on me as the their clean up guy for all the code all the time. I also becoming gatekeeper/bottleneck of sorts.
It is used make blame and dissection more difficult as more times than not I had cleaned up the code and the last one or two commits are mine.
Also the time spent in reviews reduce and you tend to miss important things as you have focused on what should be basic hygiene so much.
One of the reasons I contribute a lot less to production code is this. It is a losing battle if most devs don't care about it as much as you .
Even now the occasional pull request I would make would be peppered with such corrections , it is just automatic reflex for me, but it doesn't make that much difference.
Don't do this, people either have to value the cleanliness enough to do it as well, or you have to tolerate what is the common minimum or find another team/organization.
> But the devs, man. They just don't care.
Well, maybe. Or they just don't know how to write better code.
Either way, the bigger problem is the team management that allows this.
> I do my best to avoid rewriting wherever possible
Why not? If the other devs truly don't care, you could take it upon yourself to clean up the code base little by little when you can.