add license checking include directive only in GPL files
This commit is contained in:
@@ -17,6 +17,12 @@ def add_license_include_in_file(package_name, fname):
|
||||
if any(re.search("#include\s*<CGAL/license/", line) for line in f):
|
||||
return # include directive already there
|
||||
|
||||
#match only file under a GPL license
|
||||
with codecs.open(fname, encoding='utf-8') as f:
|
||||
if not any(re.search("SPDX-License-Identifier:.*[ (]GPL", line) for line in f):
|
||||
return # include directive already there
|
||||
|
||||
|
||||
# include directive not already there
|
||||
inserted = False
|
||||
with codecs.open(fname, encoding='utf-8') as f:
|
||||
|
||||
Reference in New Issue
Block a user