Skip to content

Commit

Permalink
feat(core): fix lint (scaleway#3730)
Browse files Browse the repository at this point in the history
feat(llm_inference): activate cli (scaleway#3729)

docs: update developers website url (scaleway#3733)

feat(llm-inference): add support llm-inference cli (scaleway#3731)

chore: enable update for github actions in dependabot (scaleway#3734)

Co-authored-by: Mia-Cross <lmarabese@scaleway.com>

feat(llm_inference): change more cli fields to positional (scaleway#3732)

Co-authored-by: Jules Casteran <jcasteran@scaleway.com>

chore(deps): bump goreleaser/goreleaser-action from 4 to 5 (scaleway#3735)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mia-Cross <lmarabese@scaleway.com>

chore(deps): bump gaurav-nelson/github-action-markdown-link-check from 1.0.13 to 1.0.15 (scaleway#3736)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

chore(deps): bump github/codeql-action from 2 to 3 (scaleway#3737)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mia-Cross <lmarabese@scaleway.com>

chore(deps): bump actions/setup-go from 3 to 5 (scaleway#3738)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mia-Cross <lmarabese@scaleway.com>

chore(deps): bump golangci/golangci-lint-action from 3 to 4 (scaleway#3739)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mia-Cross <lmarabese@scaleway.com>

chore: add support for docker in dependabot (scaleway#3741)

chore(deps): bump alpine from 3.16 to 3.19 (scaleway#3742)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

chore(deps): bump pnpm/action-setup from 2 to 3 (scaleway#3743)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mia-Cross <lmarabese@scaleway.com>

chore(deps): bump actions/checkout from 3 to 4 (scaleway#3744)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mia-Cross <lmarabese@scaleway.com>

chore(deps): bump codecov/codecov-action from 2 to 4 (scaleway#3745)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mia-Cross <lmarabese@scaleway.com>

feat(core):add test end to end

feat(core):fix lint
  • Loading branch information
scaleway-bot authored and jremy42 committed Apr 12, 2024
1 parent 6037c30 commit efcd4db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/core/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ func validateArgValues(cmd *Command, cmdArgs interface{}) error {
// Returns nil otherwise.
// TODO refactor this method which uses a mix of reflect and string arrays
func validateRequiredArgs(cmd *Command, cmdArgs interface{}, rawArgs args.RawArgs) error {

oneOfManager := NewOneOfGroupManager(cmd)

for _, arg := range cmd.ArgSpecs {
if !arg.Required || arg.OneOfGroup != "" {
continue
Expand All @@ -100,14 +103,14 @@ func validateRequiredArgs(cmd *Command, cmdArgs interface{}, rawArgs args.RawArg
}
}
}

if err := validateOneOfRequiredArgs(cmd, rawArgs, cmdArgs); err != nil {
return err
}

return nil
}


func validateOneOfRequiredArgs(cmd *Command, rawArgs args.RawArgs, cmdArgs interface{}) error {
oneOfManager := NewOneOfGroupManager(cmd)
if err := oneOfManager.ValidateUniqueOneOfGroups(rawArgs, cmdArgs); err != nil {
Expand Down

0 comments on commit efcd4db

Please sign in to comment.