It defines functions in guarddog/utils/archives.py for checking whether a file extension is for a supported archive format and uses them pervasively
It clarifies the conditions under which Guarddog will decide to perform a local scan on a target: whenever the target is a directory or a regular file in the local filesystem. It also eliminates as much as possible duplicate checking for whether the target is local and what kind of local target it is (file or directory)
It makes sure that PackageScanner.scan_local() uses its callback argument, closing issue #411
This PR makes three principal changes:
It defines functions in
guarddog/utils/archives.py
for checking whether a file extension is for a supported archive format and uses them pervasivelyIt clarifies the conditions under which Guarddog will decide to perform a local scan on a target: whenever the target is a directory or a regular file in the local filesystem. It also eliminates as much as possible duplicate checking for whether the target is local and what kind of local target it is (file or directory)
It makes sure that
PackageScanner.scan_local()
uses itscallback
argument, closing issue #411