Skip to content

Commit

Permalink
Fix lint issues after golangci-lint upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
janekbaraniewski committed Aug 14, 2024
1 parent e9b4270 commit db1223b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/pro/provider/list/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (cmd *ProjectsCmd) Run(ctx context.Context) error {
enum := []types.OptionEnum{}
for _, project := range projectList.Items {
// Filter out projects that don't have allowed runners
if project.Spec.AllowedRunners == nil || len(project.Spec.AllowedRunners) == 0 {
if len(project.Spec.AllowedRunners) == 0 {
continue
}
enum = append(enum, types.OptionEnum{
Expand Down
2 changes: 1 addition & 1 deletion pkg/ide/ideparse/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func ParseOptions(options []string, ideOptions ide.Options) (map[string]config.O

if !matcher.MatchString(value) {
if ideOption.ValidationMessage != "" {
return nil, fmt.Errorf(ideOption.ValidationMessage)
return nil, fmt.Errorf("%s", ideOption.ValidationMessage)
}

return nil, fmt.Errorf("invalid value '%s' for option '%s', has to match the following regEx: %s", value, key, ideOption.ValidationPattern)
Expand Down
2 changes: 1 addition & 1 deletion pkg/options/resolver/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func validateUserValue(optionName, userValue string, option *types.Option) error

if !matcher.MatchString(userValue) {
if option.ValidationMessage != "" {
return fmt.Errorf(option.ValidationMessage)
return fmt.Errorf("%s", option.ValidationMessage)
}

return fmt.Errorf("invalid value '%s' for option '%s', has to match the following regEx: %s", userValue, optionName, option.ValidationPattern)
Expand Down

0 comments on commit db1223b

Please sign in to comment.