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

Errors when using AllowShortFunctionsOnASingleLine #48

Closed kylef closed 9 years ago

kylef commented 9 years ago

Getting some errors trying to use the new options:

AllowShortFunctionsOnASingleLine: SFS_None

screen shot 2014-07-18 at 12 52 16

AllowShortFunctionsOnASingleLine (ShortFunctionStyle)
Dependent on the value, int f() { return 0; } can be put on a single line.

Possible values:

SFS_None (in configuration: None) Never merge functions into a single line.
SFS_Inline (in configuration: Inline) Only merge functions defined inside a class.
SFS_All (in configuration: All) Merge all functions fitting on a single line.
kylef commented 9 years ago

I assume we just need to update the clang-format in the repository, I just don't know how this is built or where from.

tonyarnold commented 9 years ago

Have you tried using None instead of SFS_None? The docs are a bit el-dodge in places.

rlindner commented 9 years ago

None is the right Value for .clang-format, but it's not working anyways, at least for Blocks in ObjC

travisjeffery commented 9 years ago

i pushed an updated clang-format yesterday (thanks to @tonyarnold). but ya clang-formats support for objc can be a bit doge