Skip to content

Commit

Permalink
Update from 29
Browse files Browse the repository at this point in the history
  • Loading branch information
Administrator committed May 28, 2022
1 parent f902eeb commit aa91c80
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions materials/build/scripts/style_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@


def get_source_filenames():
files = os.listdir(PATH_TO_PROJECT + '/src')
files_cat = os.listdir(PATH_TO_PROJECT + '/src/cat')
files_grep = os.listdir(PATH_TO_PROJECT + '/src/grep')
arr_of_files = []
for file in files:
for file in files_cat:
if file.find('.') != -1 and file[file.find('.') + 1] == 'c':
arr_of_files.append(file)
arr_of_files.append('cat/' + file)
for file in files_grep:
if file.find('.') != -1 and file[file.find('.') + 1] == 'c':
arr_of_files.append('grep/' + file)

return arr_of_files


Expand All @@ -39,11 +44,17 @@ def style_test_result(arr_of_files):
return False

delete_cpplint_config()

return True


arr_of_files = get_source_filenames()
if style_test_result(arr_of_files):
print('Style test: OK\n1')
else:
print('Style test: FAIL\n0')
def run():
arr_of_files = get_source_filenames()

if style_test_result(arr_of_files):
print('Style test: OK\n1')
else:
print('Style test: FAIL\n0')


run()

0 comments on commit aa91c80

Please sign in to comment.