3 ms·
> However, if this is your personal pet peeve then you should provide all of your developers / contributors with a plugin, script or other utility that formats
by pyre 9y ago
> However, if this is your personal pet peeve then you should provide all of your developers / contributors with a plugin, script or other utility that formats their code to your standards.
http://editorconfig.org/ http://editorconfig.org/
- pm215 9y agoInteresting idea and it would certainly help to alleviate the "how many editors do we need to provide code style config for" problem, but it looks rather limited in scope at the moment (for instance it doesn't even try to address "brace on current line or line of its own", let alone more odd things like GNU coding style brace indent).
- apetresc 9y agoIt's only really targeting text-editor-level settings, things like encoding, EOLs, and "what characters does the tab key emit". It doesn't attempt to solve every formatting/linting/style issue, that would make the editor plugins really hard to keep compatible.
- chongli 9y agoYou don't even have to do that. Just use whatever format is in the main repository. Then use git smudge and clean filters[0] to convert to your preferred format whenever git checks out the files. This way your editor does not need to care about the format everybody else uses. [0] https://stackoverflow.com/a/2318063 https://stackoverflow.com/a/2318063