summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-03-28 12:42:31 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-03-28 12:42:31 (GMT)
commit44dd6bc44854c0e2b0f076d39db9ef3b227ab3aa (patch)
treede96319fb866ac431e52a1b14e0b9970ac24bbce /BuildTools/CheckTabs.py
parent625d6a9f18c2377cdc3180e74b773ce3cbb2dcba (diff)
downloadswift-44dd6bc44854c0e2b0f076d39db9ef3b227ab3aa.zip
swift-44dd6bc44854c0e2b0f076d39db9ef3b227ab3aa.tar.bz2
Removing BuildTools module.
Diffstat (limited to 'BuildTools/CheckTabs.py')
-rwxr-xr-xBuildTools/CheckTabs.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/BuildTools/CheckTabs.py b/BuildTools/CheckTabs.py
deleted file mode 100755
index 2cc1cf7..0000000
--- a/BuildTools/CheckTabs.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-
-import os, sys
-
-foundExpandedTabs = False
-
-for (path, dirs, files) in os.walk(".") :
- if not "3rdParty" in path and not ".sconf" in path :
- 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] :
- file = open(filename, "r")
- contents = []
- contentsChanged = False
- for line in file.readlines() :
- newline = ""
- previousChar = None
- pastInitialSpace = False
- for char in line :
- if not pastInitialSpace :
- if char == ' ' and previousChar == ' ' :
- contentsChanged = True
- previousChar = '\t'
- continue
- pastInitialSpace = (char != ' ')
- if previousChar :
- newline += previousChar
- previousChar = char
- if previousChar :
- newline += previousChar
- contents.append(newline)
- 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)