Meinersbur added a comment.

In D68551#1697842 <https://reviews.llvm.org/D68551#1697842>, @mitchell-stellar 
wrote:

> I agree that a system in place that either enforces clang-formatting on 
> commit or after the fact would be ideal. Otherwise, I don't see a need to 
> have to approve these NFC commits.


The current coding policy 
<https://llvm.org/docs/CodingStandards.html#introduction> contains "Our long 
term goal is for the entire codebase to follow the convention, but we 
explicitly do not want patches that do large-scale reformatting of existing 
code." that was added after someone removed all trailing whitespace all LLVM 
files. Reformatting the code you are going to work in is fine, but not on the 
entire code base. Ideally we'd also run the regression tests in a pre-commit 
hook.

Btw, I am the author of the CMakeLists snippet quoted by @MyDeveloperDay. 
Before that, it was a shell script that didn't run on Windows. Making it part 
of the regression test basically eliminated all discussion about code 
formatting, but we had to run large-scale reformatting whenever clang-format 
changed in some way. It also runs by the polly-* buildbots which I personally 
do not like since I don't see code formatting as a reason why a build should 
fail.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68551/new/

https://reviews.llvm.org/D68551



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to