Skip to content

Commit

Permalink
Merge pull request loft-sh#1220 from janekbaraniewski/fix/update-gola…
Browse files Browse the repository at this point in the history
…ngci-lint-in-workflow

Bump golangci-lint-action v3 -> v6 and version to 1.60.1
  • Loading branch information
janekbaraniewski authored Aug 14, 2024
2 parents cee1fd7 + db1223b commit c2855e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
go-version: "1.21.8"
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --modules-download-mode vendor --timeout 15m
version: v1.60.1
args: --timeout 30m
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 c2855e6

Please sign in to comment.