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

add kill timeout after 10 seconds #33

Open delackner opened 10 years ago

delackner commented 10 years ago

Sadly, sometimes clang-format can't handle certain objective-c files and never exits. This helps deal with that. I have some pretty long files, and nothing ever takes more than 2-3 seconds to format on my weak 2011 macbook air, so I set a conservative timeout much longer than that.

delackner commented 10 years ago

BTW I found that the current build of clang-format (HEAD, so sure not so stable) does this with fewer files than the binary you have bundled. Ever a moving target, not sure what to do about that one, but for now I just copy my own clang-format into the plugin bundle.

tonyarnold commented 10 years ago

I think @travisjeffery currently bundles a customised version of clang-format that includes my patches to support sane method formatting. I uploaded a new build of customised HEAD earlier in the week, so maybe that can be pulled in?