Skip to content

Refactor common detection function to its own package #926

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

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

jvdm
Copy link
Contributor

@jvdm jvdm commented Sep 8, 2022

As suggested by Cong in #911 this PR move the basic detection methods out of stackrox/scanner into a separate package below pkg (in this case, pkg/analyzer/detection).

@jvdm jvdm requested review from c-du and RTann September 8, 2022 23:38
@jvdm jvdm changed the base branch from master to jvdm/12238/3/pull September 8, 2022 23:38
@jvdm jvdm force-pushed the jvdm/12238/4/pull branch from e62d6aa to ed91805 Compare September 9, 2022 02:12
@jvdm jvdm changed the base branch from jvdm/12238/3/pull to master September 9, 2022 02:12
@jvdm jvdm changed the base branch from master to jvdm/12238/3/pull September 9, 2022 02:12
@ghost
Copy link

ghost commented Sep 9, 2022

Images are ready for the commit at a0baafe.

To use the images, use the tag 2.26-3-ga0baafe539.

@jvdm jvdm force-pushed the jvdm/12238/3/pull branch from 7b2b835 to c123b7a Compare September 9, 2022 16:31
@jvdm jvdm force-pushed the jvdm/12238/4/pull branch from ed91805 to ad38365 Compare September 9, 2022 17:06
@jvdm jvdm changed the base branch from jvdm/12238/3/pull to master September 9, 2022 17:21
@jvdm jvdm force-pushed the jvdm/12238/4/pull branch from ad38365 to a0baafe Compare September 9, 2022 18:29
// layers, or the root layer, use `nil`. Notice that language components are not
// extracted by DetectComponents, but if provided they are annotated with
// certified RHEL dependencies, and returned.
func DetectComponents(name string, files analyzer.Files, parent *database.Layer, languageComponents []*component.Component, uncertifiedRHEL bool) (*database.Namespace, []database.FeatureVersion, *database.RHELv2Components, []*component.Component, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this is simply copy/pasted (aside from the function's rename)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved around the name to be the first parameter to match DetectNamespace. Other than that, yes, this is a copy'n'paste.

@RTann
Copy link
Collaborator

RTann commented Sep 9, 2022

Approved assuming it's a simple copy/paste

@jvdm jvdm merged commit 9e24595 into master Sep 9, 2022
@jvdm jvdm deleted the jvdm/12238/4/pull branch September 9, 2022 23:34
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