summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools/CheckTabs.py')
-rwxr-xr-xBuildTools/CheckTabs.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/BuildTools/CheckTabs.py b/BuildTools/CheckTabs.py
index c685fc4..e007a68 100755
--- a/BuildTools/CheckTabs.py
+++ b/BuildTools/CheckTabs.py
@@ -5,7 +5,6 @@ import os, sys
foundExpandedTabs = False
-for (path, dirs, files) in os.walk(".") :
- if not "3rdParty" in path and not ".sconf" in path and not ".framework" in path and not path.startswith("build") :
- for filename in [os.path.join(path, file) for file in files if (file.endswith(".cpp") or file.endswith(".h")) and not "ui_" in file and not "moc_" in file and not "qrc_" in file] :
+filename = sys.argv[1]
+if (filename.endswith(".cpp") or filename.endswith(".h")) and not "3rdParty" in filename :
file = open(filename, "r")
contents = []
@@ -30,12 +29,3 @@ for (path, dirs, files) in os.walk(".") :
file.close()
if contentsChanged :
- if len(sys.argv) > 1 and sys.argv[1] == "--fix" :
- print("Fixing tabs in " + filename)
- file = open(filename, "w")
- file.write(''.join(contents))
- file.close()
- else :
- foundExpandedTabs = True
- print(filename + " contains expanded tabs")
-
-sys.exit(foundExpandedTabs)
+ sys.exit(-1)