3 ms·
This is true - there is a definite distinction that should be made between style and code quality. Good code could be ofuscated and it would still be good code
by df3n5 14y ago
This is true - there is a definite distinction that should be made between style and code quality. Good code could be ofuscated and it would still be good code. I don't think converting bad quality code to good quality code is something that can be automated. It should be something that is caught by code review and be flagged for discussion with the whole team if it is a general anti-pattern which is emerging in the codebase.
When patterns / anti-patterns are observed, I think they should be called out and documented for future reference. This over time will lead to general coding guidelines, which are way more important than consistent syntax, as they should mitigate the hair pulling sessions you describe.