This PR adds an output_file argument to the private scan_dir function in duroc_hog, and refactors the scan_dir function to repeat less code and separate directory iteration approaches from file scanning, resulting in less repeating code.
By filtering the files in the scanned directory, these changes avoid scanning duroc_hog's output file, avoiding false finds after repeated runs.
Testing
An integration test for the duroc_hog has been included. The binary build does slow the tests down somewhat, and escargot has been included as a dev-dependency.
I think this commit conflicts / overlaps with the other. I tested the other and it seems to work and meets the intention of this request so I'll close it.
This PR is duplicated in PR #19
Fixes #16
What
This PR adds an
output_file
argument to the privatescan_dir
function induroc_hog
, and refactors thescan_dir
function to repeat less code and separate directory iteration approaches from file scanning, resulting in less repeating code.By filtering the files in the scanned directory, these changes avoid scanning
duroc_hog
's output file, avoiding false finds after repeated runs.Testing
An integration test for the
duroc_hog
has been included. The binary build does slow the tests down somewhat, and escargot has been included as a dev-dependency.