Skip to content

Commit

Permalink
fix: skip the lint cache to avoid failing the CI (#4138)
Browse files Browse the repository at this point in the history
* skip lint cache to avoid fail the ci

* fix lint issues

---------

Co-authored-by: Pantani <Pantani>
  • Loading branch information
Pantani committed May 14, 2024
1 parent 711cac2 commit a8956c8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ jobs:
go-version-file: go.mod
cache: false

- uses: golangci/golangci-lint-action@v4
- uses: golangci/golangci-lint-action@v6
if: env.GIT_DIFF
with:
version: v1.54.2
install-mode: goinstall
args: --timeout 10m
github-token: ${{ secrets.github_token }}
skip-go-installation: true
skip-pkg-cache: true
skip-build-cache: true
3 changes: 1 addition & 2 deletions ignite/templates/module/create/configs.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package modulecreate

import (
"fmt"
"path/filepath"

"github.com/gobuffalo/genny/v2"
Expand Down Expand Up @@ -38,7 +37,7 @@ func configsProtoModify(opts ConfigsOptions) genny.RunFn {
for _, paramField := range opts.Configs {
_, err := protoutil.GetFieldByName(params, paramField.Name.LowerCamel)
if err == nil {
return fmt.Errorf("duplicate field %s in %s", paramField.Name.LowerCamel, params.Name)
return errors.Errorf("duplicate field %s in %s", paramField.Name.LowerCamel, params.Name)
}

param := protoutil.NewField(
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/module/create/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func paramsProtoModify(opts ParamsOptions) genny.RunFn {
for _, paramField := range opts.Params {
_, err := protoutil.GetFieldByName(params, paramField.Name.LowerCamel)
if err == nil {
return fmt.Errorf("duplicate field %s in %s", paramField.Name.LowerCamel, params.Name)
return errors.Errorf("duplicate field %s in %s", paramField.Name.LowerCamel, params.Name)
}

param := protoutil.NewField(
Expand Down
5 changes: 3 additions & 2 deletions ignite/templates/typed/map/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func NewGenerator(replacer placeholder.Replacer, opts *typed.Options) (*genny.Ge
return g, typed.Box(componentTemplate, opts, g)
}

// keeperModify modifies the keeper to add a new collections map type
// keeperModify modifies the keeper to add a new collections map type.
func keeperModify(replacer placeholder.Replacer, opts *typed.Options) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "keeper/keeper.go")
Expand Down Expand Up @@ -729,7 +729,8 @@ func typesCodecModify(replacer placeholder.Replacer, opts *typed.Options) genny.
}
}

// TODO(@julienrbrt): extend support of dataTypeToCollectionKeyValue
// dataTypeToCollectionKeyValue returns the date type of the collection value.
// TODO(@julienrbrt): extend support of dataTypeToCollectionKeyValue.
func dataTypeToCollectionKeyValue(f field.Field) string {
var collectionKeyValue string
switch f.DataType() {
Expand Down

0 comments on commit a8956c8

Please sign in to comment.