File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,19 @@ def check_spdx_header(lines):
5353 while i < len (lines ) and not lines [i ].strip ():
5454 i += 1
5555
56- if i >= len (lines ) or not LICENSE_RE .match (lines [i ]):
57- errors .append ((i + 1 , "Missing or incorrect // license: header" ))
56+ if i >= len (lines ):
57+ errors .append ((i + 1 , "Missing // license: header" ))
58+ elif not LICENSE_RE .match (lines [i ]) or not lines [i ].split (':' , 1 )[1 ].strip ():
59+ errors .append ((i + 1 , "Incorrect or empty // license: header" ))
5860
5961 i += 1
6062 while i < len (lines ) and not lines [i ].strip ():
6163 i += 1
6264
63- if i >= len (lines ) or not COPYRIGHT_RE .match (lines [i ]):
64- errors .append ((i + 1 , "Missing or incorrect // copyright-holders: header" ))
65+ if i >= len (lines ):
66+ errors .append ((i + 1 , "Missing // copyright-holders: header" ))
67+ elif not COPYRIGHT_RE .match (lines [i ]) or not lines [i ].split (':' , 1 )[1 ].strip ():
68+ errors .append ((i + 1 , "Incorrect or empty // copyright-holders: header" ))
6569
6670 return errors
6771
You can’t perform that action at this time.
0 commit comments