Skip to content

Commit

Permalink
Check hidden files and mark 'Exlcude'.
Browse files Browse the repository at this point in the history
Signed-off-by: Wonjae Park <j.wonjae.park@gmail.com>
  • Loading branch information
JustinWonjaePark committed Jul 10, 2024
1 parent 5fd88ab commit 58b8dde
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fosslight_source/_scan_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def is_exclude_dir(dir_path):
def is_exclude_file(file_path, prev_dir=None, prev_dir_exclude_value=None):
file_path = file_path.lower()
filename = os.path.basename(file_path)
if filename.startswith('.'):
return True
if os.path.splitext(filename)[1] in _exclude_extension:
return True
if filename in _exclude_filename:
Expand Down

0 comments on commit 58b8dde

Please sign in to comment.