-
Notifications
You must be signed in to change notification settings - Fork 500
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
scan command refactor #436
Conversation
patilpankaj212
commented
Dec 21, 2020
- refactor code for scan command
- more testability for scan command
- modified existing tests for Run func
2. add new tests for Run
2. fix code smells
Codecov Report
@@ Coverage Diff @@
## master #436 +/- ##
==========================================
+ Coverage 67.06% 73.39% +6.33%
==========================================
Files 86 86
Lines 1949 1962 +13
==========================================
+ Hits 1307 1440 +133
+ Misses 524 388 -136
- Partials 118 134 +16
|
pkg/cli/scan.go
Outdated
// Verbose indicates whether to display all fields in default human readlbe output | ||
Verbose bool | ||
) | ||
var scanOptions = new(ScanOptions) |
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.
Can have a function like NewScanOptions()
which returns a new empty *ScanOptions
struct?
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 did not add any constructor function for ScanOptions struct because we are not doing any initialisation based on parameters.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |