* cmd: Allow new scorecard commands to be instantiated with options
* options: Default flags to struct field values
* options: Use constants for flag names
* options: Simplify SARIF check
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* cmd: Refactor to make importable
* options: Add support for parsing via environment variables
* options: Support setting feature flags via option
* cmd: Replace `version` with sigs.k8s.io/release-utils/version
* cmd: Move option validation into pre-run function
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* checker: Add `NewLogger` constructor for `DetailLogger` impl
* checker: Add `NewRunner` constructor for `Runner`
* cmd: Update to use refactored packages
* cmd: Move command flags and validation into an `options` package
* cmd: Move client accessors to `githubrepo` package
* cmd: Move policy and enabled checks to `policy` package
* cmd: Move results formatting to `format` package
* checker: Prefer `Set` prefixes for setters
* checker: Use `DetailLogger` return value for `NewLogger()`
* checker: Add `GetClients` accessor
* Move `FormatResults` to `pkg/`
* checks: Add getter for all checks
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* log: Initial logr/logrusr implementation
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* log: Update references to `log.Logger`
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* go.mod: Minor reorganization of `replace`s
...to prevent automatic updates from getting added to the smaller
section.
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* log: Init log package
Creates a wrapper around existing `zap.Logger` to make it easier
to replace/extend with scorecard logging.
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* log: Replace instances of `zap.Logger` with `log.Logger`
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* log: Add logic to parse `zapcore.Level`s as strings
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* log: Express log levels
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* log: Replace instances of `zapcore.Level` with `log.Level`
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* log: Fixup comments for exported functions
Signed-off-by: Stephen Augustus <foo@auggie.dev>
* Fix lint issues: whitespace linter
* Fix lint issues: wrapcheck linter
* Fix lint issues: errcheck linter
* Fix lint issues: paralleltest linter
* Fix lint issues: gocritic linter
Most changes from this commit are from passing checker.CheckResult by reference and not by value. gocritic identified that as a huge parameter.
gocritic also prefers regexp.MustCompile over Compile when the pattern is a const