Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions pkg/golinters/protogetter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down