Closed renefritze closed 5 years ago
@ftalbrecht said Arch should not be an issue for clang-format-6 (aside from the docker setup being broken itself atm) so I'll be looking into what changes we can make for a no-diff-apply with the newer format binary today
There's good and bad news. Some stuff like putting 'empty' braces on a single line got much better. Operator alignment got much worse, but only in some cases and I do not understand the differences. Indent/continuation for multi-inheritance, initializer got (I think) more consistent with the rest of the code. Here's the updated spec: https://github.com/dune-community/vcsetup/compare/clang_format_6 And the changes introduced in source, split roughly by category: https://github.com/dune-community/dune-xt-common/compare/clang_format_6
I welcome some of these changes (empty curly bracse + operator alignment, in particular regarding <<
), the others I can well live with. Go ahead and implement this everywhere, if you want to. Any idea on how to do this smoothly, given nontrivial changes and several branches and the like. Only do this on the new master?
Yeah, I would only do this after all the 'new masters' got pushed. Operator alignment is still bugging me though. Maybe I'll check an even newer clang-format. Maybe it's a bug after all.
There's also some new options we might want to consider, @dune-community/dune-xt-devs :
FixNamespaceComments (bool) If true, clang-format adds missing namespace end comments and fixes invalid existing ones.
I think enabling this is a no-brainer
CompactNamespaces (bool) If true, consecutive namespace declarations will be on the same line. If false, each namespace is declared on a new line.
I like this also.
IndentPPDirectives (PPDirectiveIndentStyle) The preprocessor directive indenting style to use.
IIRC before we started using clang-format we manually indented preprocessor directives (in if blocks for example). This setting would bring that back.
On November 14, 2018 9:29:53 AM GMT+01:00, "René Fritze" notifications@github.com wrote:
There's also some new options we might want to consider:
FixNamespaceComments (bool) If true, clang-format adds missing namespace end comments and fixes invalid existing ones.
I think enabling this is a no-brainer
CompactNamespaces (bool) If true, consecutive namespace declarations will be on the same line. If false, each namespace is declared on a new line.
I like this also.
This one I dont like that much. The others I am fine with.
IndentPPDirectives (PPDirectiveIndentStyle) The preprocessor directive indenting style to use.
IIRC before we started using clang-format we manually indented preprocessor directives (in if blocks for example). This setting would bring that back.
closed by #151
It would be very beneficial to my workflow if we could agree to bump the clang-format version to 6. Version 3.9 is no longer available in debian unstable. The minimum there is 6. 6 is also available for Stretch via backports. I'm hoping getting 6 on arch isn't problematic either. Sadly applying our 3.9 config with a clang-format-6 introduces new changes. I would look into whether we can adjust the config to prevent this or if we'd have to accept those if @dune-community/dune-xt-devs are ok with bumping the version in principle.