[PR PATCH] Simple samba fixes
Uri Simchoni
uri at samba.org
Tue Oct 20 19:52:16 UTC 2015
On 10/20/2015 09:21 PM, Jeremy Allison wrote:
> LGTM - pushed. However, there were still whitespace errors that I had
> to fix. If you're not going to use vim please learn to flag whitespace
> errors in whatever editor you are currently using. Jeremy.
At the risk of stating the obvious... "git clang-format" anyone? :)
clang-format really takes the hassle out of formatting, and the git
integration (git-clang-format script) makes sure it only re-formats the
patch and not adding "formatting hunks".
My workflow is to just run "git clang-format" after "git add" and it
goes over the staged changes and re-formats them. Then I review the
changes made by clang-format and stage them too (or, recently, not
review them and just stage them), then commit.
I have the following in my ~/.clang-format:
BasedOnStyle: LLVM
IndentWidth: 8
UseTab: true
BreakBeforeBraces: Linux
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
And the following in my ~/.gitconfig:
[clangFormat]
style = file
More information about the samba-technical
mailing list