Skip to content

Commit

Permalink
removed check for files with no license
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Utz <[email protected]>
  • Loading branch information
ant-u committed Mar 19, 2024
1 parent 9bb37b0 commit e9fbcf3
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/ros_license_toolkit/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ def __init__(self: 'LicensesInCodeCheck'):
Check.__init__(self)
self.declared_licenses: Dict[str, LicenseTag] = {}
self.files_with_uncovered_licenses: Dict[str, List[str]] = {}
self.files_with_no_licenses: List[str] = []
self.files_not_matched_by_any_license_tag: Dict[str, List[str]] = {}
self.files_with_inofficial_tag: Dict[str, List[str]] = {}

Expand All @@ -268,9 +267,6 @@ def _check_license_files(self, package: Package) -> None:
found_licenses_str = found_licenses[
'detected_license_expression_spdx']
if not found_licenses_str:
if fname not in self.files_with_no_licenses:
self.files_with_no_licenses.append(
fname)
continue
licenses = found_licenses_str.split(' AND ')
for license_str in licenses:
Expand Down Expand Up @@ -338,13 +334,6 @@ def _evaluate_result(self, package: Package) -> None:
[f" '{x[0]}' is of {x[1][0]} but its Tag is {x[1][1]}."
for x in self.files_with_inofficial_tag.items()])
self._warning(info_str)
elif self.files_with_no_licenses:
info_str = ''
info_str += 'For the following files, please add ' +\
'a License Header in SPDX format:\n' +\
'\n'.join(
[f" {x}" for x in self.files_with_no_licenses])
self._warning(info_str)
else:
self._success('All licenses found in the code are covered by a '
'license declaration.')
Expand Down

0 comments on commit e9fbcf3

Please sign in to comment.