diff options
| author | Tobias Markmann <tm@ayena.de> | 2016-04-25 19:43:29 (GMT) | 
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2016-04-25 19:43:29 (GMT) | 
| commit | 857791adda753a0f94da8317bbc019378b1f09bd (patch) | |
| tree | 96aa2e4d863d50888a16527f9fbb38712e97d8ee /BuildTools/CheckHeaders.py | |
| parent | b58ad7f4b01623a8807b8c268208bd9c8496f4e2 (diff) | |
| download | swift-857791adda753a0f94da8317bbc019378b1f09bd.zip swift-857791adda753a0f94da8317bbc019378b1f09bd.tar.bz2 | |
Convert hard tabs to four spaces in all our SConscript/*.py files
Test-Information:
Test that it still builds and unit test pass on OS X 10.11.4.
Change-Id: I2eb4a0b707991aee553db36a8cd1ae28b813acab
Diffstat (limited to 'BuildTools/CheckHeaders.py')
| -rwxr-xr-x | BuildTools/CheckHeaders.py | 46 | 
1 files changed, 23 insertions, 23 deletions
| diff --git a/BuildTools/CheckHeaders.py b/BuildTools/CheckHeaders.py index 8d20f4e..79ff85c 100755 --- a/BuildTools/CheckHeaders.py +++ b/BuildTools/CheckHeaders.py @@ -3,18 +3,18 @@  import os, sys  FORBIDDEN_INCLUDES = [ -	("iostream", ["Swiften/Base/format.h"]),  -	("Base/Log.h", []),  -	("Base/format.h", []), -	("algorithm", ["Swiften/Base/Algorithm.h", "Swiften/Base/SafeAllocator.h", "Swiften/Base/Listenable.h", "Swiften/Base/Concat.h"]),  -	("boost/bind.hpp", ["Swiften/Base/Listenable.h", "Swiften/FileTransfer/S5BTransportSession.h"]),  -	("boost/filesystem.hpp", []),  -	("Base/foreach.h", []),  -	("boost/date_time/date_time.hpp", []),  -	("boost/filesystem/filesystem.hpp", []), - -	# To avoid -	("Base/Algorithm.h", ["Swiften/StringCodecs/HMAC.h"]), +    ("iostream", ["Swiften/Base/format.h"]),  +    ("Base/Log.h", []),  +    ("Base/format.h", []), +    ("algorithm", ["Swiften/Base/Algorithm.h", "Swiften/Base/SafeAllocator.h", "Swiften/Base/Listenable.h", "Swiften/Base/Concat.h"]),  +    ("boost/bind.hpp", ["Swiften/Base/Listenable.h", "Swiften/FileTransfer/S5BTransportSession.h"]),  +    ("boost/filesystem.hpp", []),  +    ("Base/foreach.h", []),  +    ("boost/date_time/date_time.hpp", []),  +    ("boost/filesystem/filesystem.hpp", []), + +    # To avoid +    ("Base/Algorithm.h", ["Swiften/StringCodecs/HMAC.h"]),  ]  foundBadHeaders = False @@ -22,21 +22,21 @@ foundBadHeaders = False  filename = sys.argv[1]  if "3rdParty" in filename or ".sconf" in filename or ".framework" in filename or not filename.endswith(".h") : -	sys.exit(0) +    sys.exit(0)  if not "Swiften" in filename : -	sys.exit(0) +    sys.exit(0)  if filename.endswith("Swiften.h") : -	sys.exit(0) +    sys.exit(0)  file = open(filename, "r")  for line in file.readlines() : -	if not "#include" in line : -		continue -	if "Base/Log.h" in filename : -		continue -	for forbiddenInclude, ignores in FORBIDDEN_INCLUDES : -		if forbiddenInclude in line and len([x for x in ignores if x in filename]) == 0 : -			print "Found " + forbiddenInclude + " include in " + filename -			foundBadHeaders = True +    if not "#include" in line : +        continue +    if "Base/Log.h" in filename : +        continue +    for forbiddenInclude, ignores in FORBIDDEN_INCLUDES : +        if forbiddenInclude in line and len([x for x in ignores if x in filename]) == 0 : +            print "Found " + forbiddenInclude + " include in " + filename +            foundBadHeaders = True  sys.exit(foundBadHeaders) | 
 Swift
 Swift