[PATCH] Add utility to check for indentation in files or patches
simo at samba.org
Sun Apr 8 17:02:10 UTC 2018
given recent discussions I finally took some time to do what I wanted
to do for a long time.
This utilities, which I've simply stolen and adapted from MIT krb5, can
be used in commit hooks or individually to check for style issues in
commits or files.
I do not know if putting them under python/ is right, you (reviewer)
$ python ./python/cstyle.py
Your latest commit or your current uncommitted code is checked.
Pass in a revision or a revision range and specific commits can be
checked at once:
$ python ./python/cstyle.py HEAD~10..HEAD
The style violations are output per file with the line and kind of
You can style check a whole file this way:
$ python ./python/cstyle-file.py $FILENAME
$ cat $FILENAME | python ./python/cstyle-file.py
Try to check the last 100 commits for an idea of what violations are
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 19462 bytes
Desc: not available
More information about the samba-technical