-
Notifications
You must be signed in to change notification settings - Fork 277
Fix parsing Docker scan flags and Args #3276
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
base: master
Are you sure you want to change the base?
Conversation
| return true | ||
| } | ||
|
|
||
| func getDockerFlags() []cli.Flag { |
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.
no test ?
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.
added
| // Avoiding flag duplication | ||
| for _, f := range converted { | ||
| if !flagNames.Exists(f.GetName()) { | ||
| flagList = append(flagList, f) |
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.
why not use flagNames in the whole method and then convert it to slice ?
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.
if we do it, when converting to slice you will need to go over the 2 sources of flags to locate where it is.
flagNames used only so we can validate quick if a flag already exist. I can switch it to just check if the slice contains the value and remove flagNames from the func... IMO its ok like this
|
@attiasas What about creating a new function like https://github.com/jfrog/jfrog-cli/blob/master/buildtools/cli.go#L1131 for example |

masterbranch.go vet ./....go fmt ./....Depends on: