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

"Format and save" works only for fie with extension: *.c, *.cpp, *.h, *.... #24

Closed ignazioc closed 10 years ago

ignazioc commented 10 years ago

I've moved the check for file type in NSDocument category, and do the check also for "format on save" options.

tonyarnold commented 10 years ago

There's lots of white space/indent changes in this PR (I assume you applied your own format preferences to this file). It'd be best if you respected the existing indent/space settings used throughout the project.

Unless these match the clang format included with the project?

ignazioc commented 10 years ago

I've used the .clang-format file included in the project. As you can see the even 153e7b62de53bab96272e329a35b5322a88a9061 has a lot of whitespace. I think that is related to the changes on b7eb4dd82fc957abab870d9cd3866fce3da2333c commit

ObjCSpaceAfterProperty: true
travisjeffery commented 10 years ago

@ignazioc ya the whitespace changes were from me messing around. don't worry about it

tonyarnold commented 10 years ago

Carry on and ignore the white space caremad from my corner then!

ignazioc commented 10 years ago

Can you merge the PR? Or I have to change some code?