Merge branch 'master' into feature/loadingscreen-refactor

This commit is contained in:
Alexander Bock
2017-11-09 22:49:07 -06:00
committed by GitHub
246 changed files with 4256 additions and 983 deletions
+27 -3
View File
@@ -321,9 +321,22 @@ def check_line_length(lines):
def check_empty_character_at_end(lines):
# Disable this check in non-strict mode
if not is_strict_mode:
return ''
index = [i + 1 for i, s in enumerate(lines) if len(s) > 1 and s[-2] == ' ']
if len(index) > 0:
return index
else:
return ''
previousSymbols = {}
def check_header_file(file, component):
with open(file, 'r+') as f:
with open(file, 'r+', encoding="utf8") as f:
lines = f.readlines()
correctness = check_correctness(lines)
@@ -405,10 +418,13 @@ def check_header_file(file, component):
if line_length:
print(file, '\t', 'Line length exceeded: ', line_length)
empty_character_at_end = check_empty_character_at_end(lines)
if empty_character_at_end:
print(file, '\t', 'Empty character at end: ', empty_character_at_end)
def check_inline_file(file, component):
with open(file, 'r+') as f:
with open(file, 'r+', encoding="utf8") as f:
lines = f.readlines()
copyright = check_copyright(lines)
@@ -451,10 +467,14 @@ def check_inline_file(file, component):
if line_length:
print(file, '\t', 'Line length exceeded: ', line_length)
empty_character_at_end = check_empty_character_at_end(lines)
if empty_character_at_end:
print(file, '\t', 'Empty character at end: ', empty_character_at_end)
def check_source_file(file, component):
with open(file, 'r+') as f:
with open(file, 'r+', encoding="utf8") as f:
lines = f.readlines()
header = check_glm_header(lines, file)
@@ -486,6 +506,10 @@ def check_source_file(file, component):
if line_length:
print(file, '\t', 'Line length exceeded: ', line_length)
empty_character_at_end = check_empty_character_at_end(lines)
if empty_character_at_end:
print(file, '\t', 'Empty character at end: ', empty_character_at_end)
def check_files(positiveList, negativeList, component, check_function):