Skip to content

Commit

Permalink
Add unit tests #1273
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Jun 26, 2024
1 parent e1186df commit be3e6fb
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 78 deletions.
10 changes: 5 additions & 5 deletions scanpipe/pipelines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,14 @@ def extract_archive(self, location, target):
details=details,
)

def extract_archives(self):
def extract_archives(self, location=None):
"""Extract archives located in the codebase/ directory with extractcode."""
from scanpipe.pipes import scancode

extract_errors = scancode.extract_archives(
location=self.project.codebase_path,
recurse=True,
)
if not location:
location = self.project.codebase_path

extract_errors = scancode.extract_archives(location=location, recurse=True)

for resource_path, errors in extract_errors.items():
self.project.add_error(
Expand Down
Loading

0 comments on commit be3e6fb

Please sign in to comment.