File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,8 @@ matrix:
8282 echo "License check OK";
8383 else
8484 echo "License check failed, please review license issues found";
85- STATUSM="Needs review, ${retval} license issues found";
85+ COUNT=$(cat scancode-evaluate.log | grep File: | wc -l)
86+ STATUSM="Needs review, ${COUNT} license issues found";
8687 set_status "success" "$STATUSM";
8788 fi
8889
Original file line number Diff line number Diff line change 3232
3333userlog = logging .getLogger ("scancode-evaluate" )
3434userlog .setLevel (logging .INFO )
35+ logfile = os .path .join (os .getcwd (), 'scancode-evaluate.log' )
36+ log_file_handler = logging .FileHandler (logfile , mode = 'w' )
37+ userlog .addHandler (log_file_handler )
3538
3639MISSING_LICENSE_TEXT = "Missing license header"
3740MISSING_PERMISIVE_LICENSE_TEXT = "Non-permissive license"
@@ -120,7 +123,11 @@ def parse_args():
120123
121124 args = parse_args ()
122125 if args .file and os .path .isfile (args .file ):
123- sys .exit (license_check (args .directory_name , args .file ))
126+ count = license_check (args .directory_name , args .file )
127+ if count == 0 :
128+ sys .exit (0 )
129+ else :
130+ sys .exit (- 1 )
124131 else :
125132 userlog .warning ("Could not find the scancode json file" )
126133 sys .exit (- 1 )
You can’t perform that action at this time.
0 commit comments