Open gyorb opened 4 years ago
I am all for automatic code formatting. In clang, I use clang-format manually and with various tools like arcanist, git-hooks. I find it a major convenience factor for me. I use a vim-plugin CoC which suggests the following auto-formatting solutions right now:
I am not for or against any of these in particular, but I know that autopep8 refuses to format certain cases, therefore it not a fully automatic solution. I haven't tried the other ones. The ignore-rev-file option seems really handy 😉
Manual code formatting to make the code pep8 compliant can take a lot of time. black could be introduced to format automatically the python source code, it can be configured easily and there is a support for a lot of editors to automatically format the source code while writing it.
If the whole code was formatted in one commit, with a newer git the formatting commit can be left out from the git blame see the description here.
Can be integrated into the travis-ci too to check if the source code was formatted right for a PR.