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 288 forks source link

Format on save does not format when building #13

Open jschmid opened 10 years ago

jschmid commented 10 years ago

If you modify a file then build the project (⌘B) without saving, Xcode will save the file by itself. In this case you end up with files that appear modified on your SCM, but that have not been formatted.

I don't know if this should be added as a new option or integrated in the same feature, but it would be nice to be able to do this.

fabiopelosin commented 10 years ago

I consider this a “feature”, I use it to save when I don't want to trigger the formatting which might happen because I'm saving a file which is not handled by clang format as I would like or because I'm editing a file which should not be formatted (e.g. json).