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

fix(detector): library.Scan move to detector #1864

Merged
merged 1 commit into from Mar 6, 2024

Conversation

MaineK00n
Copy link
Collaborator

@MaineK00n MaineK00n commented Mar 5, 2024

What did you implement:

move library.Scan from models/library.go to detector/library.go to satisfy the build constraints.

https://github.com/future-architect/vuls/actions/runs/8152149470/job/22281138184

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

before

$ make build-scanner 
CGO_ENABLED=0 go build -tags=scanner -a -ldflags "-X 'github.com/future-architect/vuls/config.Version=v0.24.9' -X 'github.com/future-architect/vuls/config.Revision=build-20240305_161924_54dae08'" -o vuls ./cmd/scanner
package github.com/future-architect/vuls/cmd/scanner
	imports github.com/future-architect/vuls/subcmds
	imports github.com/future-architect/vuls/models
	imports github.com/future-architect/vuls/detector/javadb: build constraints exclude all Go files in /home/mainek00n/github/github.com/MaineK00n/vuls/detector/javadb
make: *** [GNUmakefile:36: build-scanner] Error 1

after

$ make build-scanner
CGO_ENABLED=0 go build -tags=scanner -a -ldflags "-X 'github.com/future-architect/vuls/config.Version=v0.24.9' -X 'github.com/future-architect/vuls/config.Revision=build-20240305_162019_54dae08'" -o vuls ./cmd/scanner
$ echo $?
0

Checklist:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES

Reference

Copy link
Collaborator

@shino shino left a comment

Choose a reason for hiding this comment

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

Thanks!!

@MaineK00n MaineK00n force-pushed the MaineK00n/build-scanner branch 3 times, most recently from 57ca56c to 42c5d11 Compare March 5, 2024 09:12
@MaineK00n MaineK00n marked this pull request as ready for review March 5, 2024 09:12
@MaineK00n MaineK00n changed the title fix: use detector/javadb in build-scanner fix(detector): library.Scan move to detector Mar 5, 2024
@MaineK00n MaineK00n self-assigned this Mar 5, 2024
Copy link
Collaborator

@shino shino left a comment

Choose a reason for hiding this comment

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

Thanks for your rescue!

@MaineK00n MaineK00n merged commit bf14b5f into master Mar 6, 2024
7 checks passed
@MaineK00n MaineK00n deleted the MaineK00n/build-scanner branch March 6, 2024 07:59
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.

None yet

2 participants