Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(linters): Fix non-input/output plugin errcheck warnings #15472

Merged
merged 13 commits into from
Jun 12, 2024
Prev Previous commit
Next Next commit
processors
  • Loading branch information
DStrand1 committed Jun 6, 2024
commit 00b8eea0c0a73aa5cb18dffc11b70f56b1426e66
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,6 @@ issues:
- path: plugins/outputs/*
linters:
- errcheck
- path: plugins/processors/*
linters:
- errcheck
- path: plugins/secretstores/*
linters:
- errcheck
Expand Down
1 change: 1 addition & 0 deletions plugins/processors/dedup/dedup.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func (d *Dedup) GetState() interface{} {
for _, value := range d.Cache {
v = append(v, value)
}
//nolint:errcheck // no way to propagate the error
DStrand1 marked this conversation as resolved.
Show resolved Hide resolved
state, _ := s.SerializeBatch(v)
return state
}
Expand Down
3 changes: 2 additions & 1 deletion plugins/processors/execd/execd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ func runCountMultiplierProgram() {
fieldName := os.Getenv("FIELD_NAME")
parser := influx.NewStreamParser(os.Stdin)
serializer := &influxSerializer.Serializer{}
_ = serializer.Init() // this should always succeed
//nolint:errcheck // this should always succeed
serializer.Init()

for {
m, err := parser.Next()
Expand Down
1 change: 1 addition & 0 deletions plugins/processors/filepath/filepath.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func (o *Options) processMetric(metric telegraf.Metric) {
// Rel
for _, v := range o.Rel {
o.applyFunc(v.BaseOpts, func(s string) string {
//nolint:errcheck // no way to propagate the error
relPath, _ := filepath.Rel(v.BasePath, s)
return relPath
DStrand1 marked this conversation as resolved.
Show resolved Hide resolved
}, metric)
Expand Down