Skip to content

Commit

Permalink
bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
dennyzhang committed Sep 5, 2017
1 parent 3823a97 commit 6d1b32e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/enforce_rubocopcheck/enforce_rubocopcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
##
## --
## Created : <2017-04-02>
## Updated: Time-stamp: <2017-09-04 18:55:31>
## Updated: Time-stamp: <2017-09-05 17:46:10>
##-------------------------------------------------------------------
import argparse
import sys
Expand Down Expand Up @@ -52,7 +52,7 @@ def run_check(code_folder, check_pattern):
returncode = subprocess.call(check_pattern, shell=True)
if returncode != 0:
has_error = True
print("Error to run %s. Return code: %d" % (check_pattern, returncode))
print("Error to run '%s'. Return code: %d" % (check_pattern, returncode))
return has_error
################################################################################
#
Expand Down Expand Up @@ -83,10 +83,10 @@ def run_check(code_folder, check_pattern):
print("Run rubocop for *.rb under %s" % (code_dir))
folder_list = ignore_folder(code_dir, check_ignore_folder)

has_error = True
has_error = False
for folder in folder_list:
if run_check(folder, "rubocop .") is False:
has_error = False
if run_check(folder, "rubocop .") is True:
has_error = True

if has_error is False:
print("OK: no error detected from rubocop check")
Expand Down

0 comments on commit 6d1b32e

Please sign in to comment.