Skip to content

plugins/clang-format: fix crash on non-zero exit of clang-format

Builder crashes when the .clang-format file has invalid options. Following .clang-format config is sufficient to reproduce the issue with clang-format version 18.1.1:

---
Language:        Cpp
AlignEscapedNewlines: Align

that produces error with clang-format:

/tmp/.clang-format:3:23: error: unknown enumerated scalar
AlignEscapedNewlines: Align
                      ^~~~~
Error reading /tmp/.clang-format: Invalid argument

Merge request reports