Re: C++11 Quickbook
Daniel James via Boost-docs <[email protected]> Fri, 10 Nov 2017 19:19:42 +0000
| Newsgroups | gmane.comp.lib.boost.documentation |
|---|---|
| Message-ID | <CAHOE3yfqKJ46C4=1Wgm3CQ7GrX7an0NfiuCr4Ck+c2LLaHe0sA@mail.gmail.com> |
On 10 November 2017 at 18:25, Edward Diener via Boost-docs <[email protected]> wrote: >> >> I'm also thinking about using clang-format. Would anyone object to >> that? Of course I'll have to stop it formatting spirit grammars, so it >> can't be used everywhere. > > > How would you be using clang-format in quickbook ? It's used to automatically format the C++ source code to have a consistent style. It lets you specify things like where braces are places, what indentation is used, how wide lines of code can be. I've been using it with unordered, and find it helps me develop faster. I think a consistent code layout also helps. I tried to create a format that isn't too different from existing code, although as different parts were written with different styles, and there are some things that it can't do. You can see the result here: https://github.com/danieljames/quickbook/commit/580316c6a5cae1812341c76feb45582cecd44eb6 Although that version doesn't actually work on windows because it messes up the header ordering, so I've tweaked the configuration a little more since. I've got a bash script I use to run it, so I'll probably check that in. But don't worry about it if you're creating a pull request, I'd just reformat after merging (it's possible to rewrite the history of the pull request so it's formatted correctly, but I think that would cause confusion).