Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Scanner class to provide options to init() #445

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ryanohoro
Copy link
Collaborator

Describe the change

Scanners had an init() function that could be used before the first execution of the scanner, however, it did not have access to the config options, limiting how useful it was.

This PR adds the scanner options to init() and updates all scanners with the new style, or a skeleton function.

Describe testing procedures

Docker container builds properly.

Sample output

N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of and tested my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@ryanohoro ryanohoro marked this pull request as draft March 11, 2024 16:48
@jshlbrd
Copy link
Contributor

jshlbrd commented Mar 31, 2024

FWIW, init wasn't designed to use options (probably because I didn't know a lot about software design at the time). But if you're going to do this, which seems pretty reasonable, then you might as well remove options from the scan methods because init isn't actually doing anything in this PR. I'm not sure how it would break existing deployments but "loading" options on init instead of every scan may save a few micro or milliseconds of runtime for each scan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants