> On Mar 18, 2016, at 10:22 AM, Michael Park <mp...@apache.org> wrote: > > Hi James, > > Someone would need to propose to auto-format everything with clang-format > and convince the community > that while clang-format will never be perfect, it generates a systematic, > sane and just as readable codebase. > If we can reach consensus on that, we could add it as a commit hook and no > one will worry about formatting. > > I dreamed of the world described above, but at least at the time > clang-format was still learning about some > of the C++11 constructs (especially around lambdas), so it seemed a bit too > far fetched. > > My goal with clang-format currently is for people to have it integrated in > their editors to help them get 80, 90% > of the way there with single key-stroke, then follow-up with necessary > minor edits.
Yeh the current config did help me get a start on the correct style. Unfortunately you can only run it once otherwise it eats it again. To deal with whitespace, IMHO the best approach is to automatically run git-stripspace and do without the double-blanks :) > We've been converging from > both sides to get that percentage higher (new features in clang-format + > modifying our style), and we'll continue > to make such efforts where it makes sense. > > MPark > > On 18 March 2016 at 12:45, James Peach <jor...@gmail.com> wrote: > >> >>> On Mar 17, 2016, at 10:41 AM, Yong Tang <yong.tang.git...@outlook.com> >> wrote: >>> >>> Hi All >>> >>> >>> This email is to announce that the default configuration and the >> recommended version of the clang-format is being upgraded to 3.8 (from 3.5) >> in mesos. >>> >>> >>> In clang-format-3.8, the newly introduced option "AlignAfterOpenBracket: >> AlwaysBreak" closes the largest gap between ClangFormat and the style guide >> in mesos. It avoids "jaggedness" in function calls and is worth migrating >> for. >>> >>> >>> Along with the changes in clang-format configuration >> (support/clang-format), the documentation (docs/clang-format.md) is also >> going to be updated to reflect changes in version and the recommended >> installation process. >>> >>> >>> More details about this upgrade could be found in MESOS-4906 ( >> https://issues.apache.org/jira/browse/MESOS-4906). By the way, thanks >> Michael for the help on this issue. >> >> This sounds really promising. Is the plan to auto-format everything with >> clang-format?