Skip to content

Commit

Permalink
Merge pull request #140 from fosslight/temp
Browse files Browse the repository at this point in the history
Bug fix of same folder name in lint and add
  • Loading branch information
soimkim authored Mar 6, 2023
2 parents 9d68f01 + 420897e commit 90fbf29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fosslight_prechecker/_precheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,13 @@ def precheck_for_project(path_to_find):
missing_license = [str(sub) for sub in set(report.files_without_licenses)]
if not path_to_find.endswith(f"{os.sep}"):
path_to_find += f"{os.sep}"
missing_license = [sub.replace(path_to_find, '') for sub in missing_license]
missing_license = [sub.replace(path_to_find, '', 1) for sub in missing_license]

# File list that missing copyright text
missing_copyright = [str(sub) for sub in set(report.files_without_copyright)]
if not path_to_find.endswith(f"{os.sep}"):
path_to_find += f"{os.sep}"
missing_copyright = [sub.replace(path_to_find, '') for sub in missing_copyright]
missing_copyright = [sub.replace(path_to_find, '', 1) for sub in missing_copyright]
except Exception as ex:
dump_error_msg(f"Error prechecker lint: {ex}", True)

Expand Down

0 comments on commit 90fbf29

Please sign in to comment.