From ecc6a69f4f7e04049d2d5542e543656c2773888f Mon Sep 17 00:00:00 2001 From: Miguel Angel Ajo Date: Sat, 16 Mar 2013 00:28:35 +0100 Subject: [PATCH] Also check coding style of new files, not only modified ones --- tools/checkcoding.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/checkcoding.py b/tools/checkcoding.py index 0f6bb59add..699387f54c 100755 --- a/tools/checkcoding.py +++ b/tools/checkcoding.py @@ -1,7 +1,7 @@ #!/usr/bin/env python 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 @@ -14,8 +14,6 @@ def uncrustify_file(filename): popen.wait() return [popen.stdout.readlines(),popen.stderr.read()] - - # # This function talks to bzr, and gets the list of modified files # @@ -34,6 +32,10 @@ def bzr_modified(): if line.startswith("modified:"): in_modifieds = True continue + if line.startswith("added:"): + in_modifieds = True + continue + if in_modifieds: modifieds.append( line.lstrip("\t ").rstrip("\t ") )