From a8956c8153b293ff781f22399b88e2c56723e7e7 Mon Sep 17 00:00:00 2001 From: Danilo Pantani Date: Tue, 14 May 2024 15:45:21 +0200 Subject: [PATCH] fix: skip the lint cache to avoid failing the CI (#4138) * skip lint cache to avoid fail the ci * fix lint issues --------- Co-authored-by: Pantani --- .github/workflows/test-lint.yml | 5 ++++- ignite/templates/module/create/configs.go | 3 +-- ignite/templates/module/create/params.go | 2 +- ignite/templates/typed/map/map.go | 5 +++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-lint.yml b/.github/workflows/test-lint.yml index 92c7e8ece1..3bdfdaab3b 100644 --- a/.github/workflows/test-lint.yml +++ b/.github/workflows/test-lint.yml @@ -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 diff --git a/ignite/templates/module/create/configs.go b/ignite/templates/module/create/configs.go index 59c95f2a5b..7d7f43f234 100644 --- a/ignite/templates/module/create/configs.go +++ b/ignite/templates/module/create/configs.go @@ -1,7 +1,6 @@ package modulecreate import ( - "fmt" "path/filepath" "github.com/gobuffalo/genny/v2" @@ -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( diff --git a/ignite/templates/module/create/params.go b/ignite/templates/module/create/params.go index 91fe9ea8ba..d6b89a4103 100644 --- a/ignite/templates/module/create/params.go +++ b/ignite/templates/module/create/params.go @@ -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( diff --git a/ignite/templates/typed/map/map.go b/ignite/templates/typed/map/map.go index f11175b955..9efc0509ca 100644 --- a/ignite/templates/typed/map/map.go +++ b/ignite/templates/typed/map/map.go @@ -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") @@ -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() {