travisjeffery / ClangFormat-Xcode

Xcode plug-in to to use clang-format from in Xcode and consistently format your code with Clang
https://twitter.com/travisjeffery
MIT License
2.89k stars 287 forks source link

Notify user if provided .clang-format is rejected #14

Closed mthiesen closed 10 years ago

mthiesen commented 10 years ago

If clang-format is unable to parse the .clang-format file it falls back to the LLVM style. On the command line this is obvious to the user as a helpful error message like the following is printed:

YAML:20:23: error: unknown enumerated scalar
NamespaceIndentation: Never
                      ^~~~~

Users of ClangFormat-Xcode don't get to see this message. They just notice that their code is formatted in a weird way without any indication why this happend.

ClangFormat-Xcode should present the user with the error message so that the user can fix the .clang-format file.

Goles commented 10 years ago

:+1:

veryangryant commented 10 years ago

I created pull request [https://github.com/travisjeffery/ClangFormat-Xcode/pull/20] with proposed fix for that.

travisjeffery commented 10 years ago

done in cc72a2adb51b288e2d731e4a7f1eccd65e4b88b7