From 3ff416302f619c4f44904ef1ac03cfc974e5b207 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Jan 2024 16:43:01 +0100 Subject: [PATCH] build(deps): bump github.com/ghostiam/protogetter from 0.3.3 to 0.3.4 (#4327) Co-authored-by: Fernandez Ludovic --- .golangci.reference.yml | 3 +++ go.mod | 2 +- go.sum | 4 ++-- pkg/config/linters_settings.go | 7 ++++--- pkg/golinters/protogetter.go | 7 ++++--- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.golangci.reference.yml b/.golangci.reference.yml index 6ba2fff5..3f87428e 100644 --- a/.golangci.reference.yml +++ b/.golangci.reference.yml @@ -1489,6 +1489,9 @@ linters-settings: # Skip any generated files from the checking. # Default: false skip-any-generated: true + # Skip first argument of append function. + # Default: false + replace-first-arg-in-append: true reassign: # Patterns for global variable names that are checked for reassignment. diff --git a/go.mod b/go.mod index 4b238bf9..c916c0cc 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/fatih/color v1.16.0 github.com/firefart/nonamedreturns v1.0.4 github.com/fzipp/gocyclo v0.6.0 - github.com/ghostiam/protogetter v0.3.3 + github.com/ghostiam/protogetter v0.3.4 github.com/go-critic/go-critic v0.11.0 github.com/go-xmlfmt/xmlfmt v1.1.2 github.com/gofrs/flock v0.8.1 diff --git a/go.sum b/go.sum index 3e318449..3789b0f0 100644 --- a/go.sum +++ b/go.sum @@ -143,8 +143,8 @@ github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwV github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/ghostiam/protogetter v0.3.3 h1:EvOuzB/SEifg/c4aMnwcj033Qc1lHO7Yz4QnBDbmbik= -github.com/ghostiam/protogetter v0.3.3/go.mod h1:A0JgIhs0fgVnotGinjQiKaFVG3waItLJNwPmcMzDnvk= +github.com/ghostiam/protogetter v0.3.4 h1:5SZ+lZSNmNkSbGVSF9hUHhv/b7ELF9Rwchoq7btYo6c= +github.com/ghostiam/protogetter v0.3.4/go.mod h1:A0JgIhs0fgVnotGinjQiKaFVG3waItLJNwPmcMzDnvk= github.com/go-critic/go-critic v0.11.0 h1:mARtIFX7jPtJ3SzxO9Isa5T2jd2dZxFmQHK3yNf0wrE= github.com/go-critic/go-critic v0.11.0/go.mod h1:Cz6lr1PlkIu/0Y0U9KqJgcIJJECAF8mEwmzVjKnhbfI= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= diff --git a/pkg/config/linters_settings.go b/pkg/config/linters_settings.go index fd7c5f80..a3206f59 100644 --- a/pkg/config/linters_settings.go +++ b/pkg/config/linters_settings.go @@ -730,9 +730,10 @@ type PromlinterSettings struct { } type ProtoGetterSettings struct { - SkipGeneratedBy []string `mapstructure:"skip-generated-by"` - SkipFiles []string `mapstructure:"skip-files"` - SkipAnyGenerated bool `mapstructure:"skip-any-generated"` + SkipGeneratedBy []string `mapstructure:"skip-generated-by"` + SkipFiles []string `mapstructure:"skip-files"` + SkipAnyGenerated bool `mapstructure:"skip-any-generated"` + ReplaceFirstArgInAppend bool `mapstructure:"replace-first-arg-in-append"` } type ReassignSettings struct { diff --git a/pkg/golinters/protogetter.go b/pkg/golinters/protogetter.go index fbd760f1..9a5e7b4d 100644 --- a/pkg/golinters/protogetter.go +++ b/pkg/golinters/protogetter.go @@ -19,9 +19,10 @@ func NewProtoGetter(settings *config.ProtoGetterSettings) *goanalysis.Linter { var cfg protogetter.Config if settings != nil { cfg = protogetter.Config{ - SkipGeneratedBy: settings.SkipGeneratedBy, - SkipFiles: settings.SkipFiles, - SkipAnyGenerated: settings.SkipAnyGenerated, + SkipGeneratedBy: settings.SkipGeneratedBy, + SkipFiles: settings.SkipFiles, + SkipAnyGenerated: settings.SkipAnyGenerated, + ReplaceFirstArgInAppend: settings.ReplaceFirstArgInAppend, } } cfg.Mode = protogetter.GolangciLintMode