Page MenuHome

Clang-format migration: Investigate clang-format versions on common Linux & Mac distros
Closed, ResolvedPublicTO DO


The new .clang-format style for Blender relies on the IndentPPDirectives: AfterHash configuration setting, which is important to keeping preprocessor directives readable. However, it is only supported in post 6.0 clang-format.

This task is to check to ensure that on platforms of relevance, clang-format is either already up to date by default, or determining a clear way to install an updated clang-format. This is relevant for T60277.

Event Timeline

Keir Mierle (keir) lowered the priority of this task from 90 to Normal.Jan 7 2019, 5:30 PM
Keir Mierle (keir) created this task.

is that 6.0+ or is a bare 6.0 'good enough' on windows we have 6.0.0 on vs2017, and 7.0.0 on the vs2019(-pre release) out of the box shipped with vs. We have a 6.0.1 copy in the svn libraries, but that will have to be manually configured by the end user if we want to use that.

6.0.0 should be good enough, though this needs a bit more verification.

For macOS clang-format is not included with Xcode. So I've added it to the to the lib directory now and made make format use it. It's version 6.0.1.

@Brecht Van Lommel (brecht), does it worth supporting system-wide clang-format (which could be installed via homebrew) ?

I don't think there's a benefit to using another clang-format binary, if we know the one in the lib directory works. Seems more reliable to use a version we know is ok.

Brecht Van Lommel (brecht) claimed this task.

We have a minimum an maximum version defined now (6 to 9 currently).