[PATCH] Add utility to check for indentation in files or patches

Simo simo at samba.org
Sun Apr 8 17:02:10 UTC 2018

Hi all,
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)
tell me.

$ 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...
Name: 0001-Add-utilities-to-check-style.patch
Type: text/x-patch
Size: 19462 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180408/9cf5c687/0001-Add-utilities-to-check-style.bin>

More information about the samba-technical mailing list