3 ms·
That's a good policy for code reviews, but again it's hard to do it correctly in a tool. The compiler would need to require braces in new code, but allow brace
by iainmerrick 11y ago
That's a good policy for code reviews, but again it's hard to do it correctly in a tool.
The compiler would need to require braces in new code, but allow brace-free style in old code; you'd need to integrate it with the source control system so it knows what code is new. Doable, but tricky.
- mikaraento 11y agoI've found improving style checks file-by-file to be a reasonable approach: - all new files are checked - old files are put in a whitelist for the style checker, the submitter is supposed to remove the file from the whitelist when signifcant changes are made
- gravypod 11y agoI'm very glad to see that I'm not the only one who does this. I wanted to see if others felt that this process worked. It is good to hear others are doing it.
- jjuhl 11y agoEver heard of clang-format? http://clang.llvm.org/docs/ClangFormat.html http://clang.llvm.org/docs/ClangFormat.html