Skip to content

Commit

Permalink
Add cleanup process
Browse files Browse the repository at this point in the history
  • Loading branch information
mistzzt committed Oct 29, 2017
1 parent e1d6d32 commit a545440
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions palint.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ def process_project():
return EXIT_FAILURE
print('Completed!')

print('\n')
print('Performing cleanup...')
cleanup()
print('Completed!')


def check_files(files, optionals, libraries):
has_error = False
Expand Down Expand Up @@ -215,6 +220,7 @@ def format_code(files, optionals):
os.system(cmd)

for name in files:
print('\n')
print('Showing diff of file {} ...'.format(name))

status = os.system('diff {0} {1}/{0}'.format(name, backup_folder))
Expand All @@ -226,6 +232,7 @@ def format_code(files, optionals):
print('Reverted file ' + name)

for name in optionals:
print('\n')
print('Showing diff of file {} ...'.format(name))

status = os.system('diff {0} {1}/{0}'.format(name, backup_folder))
Expand All @@ -237,6 +244,11 @@ def format_code(files, optionals):
print('Reverted file ' + name)


def cleanup():
""" Clean compiled class files. """
os.system('rm *.class')


def error(msg):
""" Show error message to user. """
sys.stdout.write('[Error] ' + msg + '\n')
Expand Down

0 comments on commit a545440

Please sign in to comment.