-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: more verbose log messages in all commands #61
Conversation
@@ -63,7 +64,7 @@ func enrichCDXLicense(component cdx.Component, packageData packages.Package) cdx | |||
return component | |||
} | |||
|
|||
func enrichExternalReference(component cdx.Component, packageData packages.Package, url *string, refType cdx.ExternalReferenceType) cdx.Component { | |||
func enrichExternalReference(component cdx.Component, _ packages.Package, url *string, refType cdx.ExternalReferenceType) cdx.Component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to appease the linter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're at it, would it make sense to remove the packages.Package
param altogether and possibly extract the enrichExternalReference
to the cdx utils? could be reused in the future for enrichers other than ecosystems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll change this in a later PR if that's ok. IMHO we should change all the enrichers anyway, to receive a pointer to a component and mutate; we could do this all in a refactoring PR.
@@ -63,7 +64,7 @@ func enrichCDXLicense(component cdx.Component, packageData packages.Package) cdx | |||
return component | |||
} | |||
|
|||
func enrichExternalReference(component cdx.Component, packageData packages.Package, url *string, refType cdx.ExternalReferenceType) cdx.Component { | |||
func enrichExternalReference(component cdx.Component, _ packages.Package, url *string, refType cdx.ExternalReferenceType) cdx.Component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're at it, would it make sense to remove the packages.Package
param altogether and possibly extract the enrichExternalReference
to the cdx utils? could be reused in the future for enrichers other than ecosystems
This normalizes the style of log messages throughout the different commands, and adds more debug logging, specifically for skipped packages during
enrich
commands (ecosystems
,snyk
).Closes #14.