New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removed trailing spaces #579
base: development
Are you sure you want to change the base?
Conversation
…rce and from .cs, .gui in the whole folder
Doesn't seem worth it unless it also fixes the code style problems and corrects code alignment for 4 spaces instead of 3. |
that should happen as step 2 ;) |
I see no reason not to do this in our 'future' branch. Do you have any idea why the automatic merge fails? |
anyways, this is the script that does the job: import os
import operator
def fixTrailingSpaces(path, sexts):
exts = {}
for path, dirs, files in os.walk('.'):
for f in files:
file_name, file_extension = os.path.splitext(f)
if not file_extension in exts:
exts[file_extension] = 0
exts[file_extension] += 1
#continue
if file_extension in sexts:
path_name = os.path.join(path, f)
print path_name
with open(path_name, 'r') as fh:
new = [line.rstrip() for line in fh]
with open(path_name, 'w') as fh:
[fh.write('%s\n' % line) for line in new]
for e in sorted(exts.iteritems(), key=operator.itemgetter(1), reverse=True):
print "% 5d : %s" %(e[1], e[0])
fixTrailingSpaces('.', ".cs .gui".split())
fixTrailingSpaces('Engine/source', ".c .cpp .h .hlsl .glsl".split()) |
Uh sorry, by 'future' branch I mean whatever branch we end up using for sweeping changes that may upset people :P. But yeah, this seems pretty inoffensive. |
alright, i vote for leaving this open to the end, so we won't forget ;) |
Removed trailing spaces from: