Closed grevolution closed 10 years ago
There is, but is there a reason why you can't just turn on format on save?
just as an extra precaution if some developer (working in teams) forgets to use the option format on save.
You can edit your Xcode Scheme to add a Pre or Post Build action — just run clang-format manually using a script on all of your files. It's going to be a bit clunky though.
You could certainly also add a pre-commit script that calls clang-format manually (although you'd probably want to install clang-format via homebrew — it's in the llvm package, I believe).
sure, i'll try that. thank you :+1:
Hi,
is there a way to enforce the ClangFormat rules on a file during compilation? or during a commit? like uncrustify-pre-commit