Also check coding style of new files, not only modified ones
This commit is contained in:
parent
6c614e2996
commit
ecc6a69f4f
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import subprocess, os, difflib
|
import subprocess, os, difflib
|
||||||
|
|
||||||
EXTENSIONS=["cpp","cxx","h","hpp"]
|
EXTENSIONS=["cpp","cxx","h","hpp","c"]
|
||||||
|
|
||||||
#
|
#
|
||||||
# Function to call uncrustify, it returns the re-formated code and
|
# Function to call uncrustify, it returns the re-formated code and
|
||||||
|
@ -14,8 +14,6 @@ def uncrustify_file(filename):
|
||||||
popen.wait()
|
popen.wait()
|
||||||
return [popen.stdout.readlines(),popen.stderr.read()]
|
return [popen.stdout.readlines(),popen.stderr.read()]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# This function talks to bzr, and gets the list of modified files
|
# This function talks to bzr, and gets the list of modified files
|
||||||
#
|
#
|
||||||
|
@ -34,6 +32,10 @@ def bzr_modified():
|
||||||
if line.startswith("modified:"):
|
if line.startswith("modified:"):
|
||||||
in_modifieds = True
|
in_modifieds = True
|
||||||
continue
|
continue
|
||||||
|
if line.startswith("added:"):
|
||||||
|
in_modifieds = True
|
||||||
|
continue
|
||||||
|
|
||||||
if in_modifieds:
|
if in_modifieds:
|
||||||
modifieds.append( line.lstrip("\t ").rstrip("\t ") )
|
modifieds.append( line.lstrip("\t ").rstrip("\t ") )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue