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

Linter fixes for plugins/inputs/[c]* #9194

Merged
merged 2 commits into from
Apr 28, 2021
Merged

Linter fixes for plugins/inputs/[c]* #9194

merged 2 commits into from
Apr 28, 2021

Conversation

zak-pawel
Copy link
Collaborator

Following findings were fixed:

plugins/inputs/cassandra/cassandra.go:150:3                           revive       early-return: if c {...} else {... return } can be simplified to if !c { ... return } ...
plugins/inputs/cassandra/cassandra.go:159:3                           revive       early-return: if c {...} else {... return } can be simplified to if !c { ... return } ...
plugins/inputs/cassandra/cassandra.go:77:9                            revive       early-return: if c {...} else {... return } can be simplified to if !c { ... return } ...
plugins/inputs/ceph/ceph.go:180:9                                     revive       early-return: if c {...} else {... return } can be simplified to if !c { ... return } ...
plugins/inputs/ceph/ceph.go:321:16                                    revive       import-shadowing: The name 'exec' shadows an import name
plugins/inputs/ceph/ceph.go:8:2                                       revive       imports-blacklist: should not use the following blacklisted import: "log"
plugins/inputs/cgroup/cgroup_linux.go:75:12                           revive       import-shadowing: The name 'path' shadows an import name
plugins/inputs/chrony/chrony_test.go:106:3                            revive       deep-exit: calls to os.Exit only in main() or init() functions
plugins/inputs/chrony/chrony_test.go:108:2                            revive       deep-exit: calls to os.Exit only in main() or init() functions
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt.go:18:2        staticcheck  SA1019: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead. 
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt.go:279:2       revive       import-shadowing: The name 'peer' shadows an import name
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt.go:378:9       revive       import-shadowing: The name 'metric' shadows an import name
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt.go:54:2        revive       confusing-naming: Field 'aliases' differs only by capitalization to other field in the struct type CiscoTelemetryMDT
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt_test.go:104:2  revive       import-shadowing: The name 'telemetry' shadows an import name
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt_test.go:13:2   staticcheck  SA1019: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead. 
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt_test.go:172:2  revive       import-shadowing: The name 'telemetry' shadows an import name
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt_test.go:245:2  revive       import-shadowing: The name 'telemetry' shadows an import name
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt_test.go:26:2   revive       import-shadowing: The name 'telemetry' shadows an import name
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt_test.go:334:2  revive       import-shadowing: The name 'telemetry' shadows an import name
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt_test.go:408:2  revive       import-shadowing: The name 'telemetry' shadows an import name
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt_test.go:493:2  revive       import-shadowing: The name 'telemetry' shadows an import name
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt_test.go:627:2  revive       import-shadowing: The name 'telemetry' shadows an import name
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_mdt_test.go:724:2  revive       import-shadowing: The name 'telemetry' shadows an import name
plugins/inputs/cisco_telemetry_mdt/cisco_telemetry_util.go:142:42     revive       unnecessary-stmt: switch with only one case can be replaced by an if-then
plugins/inputs/clickhouse/clickhouse.go:563:33                        revive       import-shadowing: The name 'url' shadows an import name
plugins/inputs/clickhouse/clickhouse_test.go:577:48                   revive       unnecessary-stmt: switch with only one case can be replaced by an if-then
plugins/inputs/cloudwatch/cloudwatch.go:1:9                           revive       import-shadowing: The name 'cloudwatch' shadows an import name
plugins/inputs/cloudwatch/cloudwatch.go:272:2                         revive       import-shadowing: The name 'proxy' shadows an import name
plugins/inputs/cloudwatch/cloudwatch.go:352:13                        revive       import-shadowing: The name 'metric' shadows an import name
plugins/inputs/cloudwatch/cloudwatch.go:463:10                        revive       import-shadowing: The name 'metric' shadows an import name
plugins/inputs/cloudwatch/cloudwatch.go:593:9                         revive       import-shadowing: The name 'metric' shadows an import name
plugins/inputs/cloudwatch/cloudwatch.go:659:30                        revive       import-shadowing: The name 'metric' shadows an import name
plugins/inputs/cloudwatch/cloudwatch_test.go:1:9                      revive       import-shadowing: The name 'cloudwatch' shadows an import name
plugins/inputs/couchbase/couchbase.go:1:9                             revive       import-shadowing: The name 'couchbase' shadows an import name
plugins/inputs/cpu/cpu.go:1:9                                         revive       import-shadowing: The name 'cpu' shadows an import name
plugins/inputs/cpu/cpu_test.go:1:9                                    revive       import-shadowing: The name 'cpu' shadows an import name
plugins/inputs/csgo/csgo.go:33:1                                      revive       receiver-naming: receiver name should not be an underscore, omit the name if it is unused
plugins/inputs/csgo/csgo.go:48:1                                      revive       receiver-naming: receiver name should not be an underscore, omit the name if it is unused

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Apr 26, 2021
Copy link
Contributor

@ivorybilled ivorybilled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to fix the linter warning ;) lol

@zak-pawel
Copy link
Collaborator Author

zak-pawel commented Apr 26, 2021

Just need to fix the linter warning ;) lol

@jagularr I missed that, lol :)

@sspaink sspaink merged commit 1fabc5f into influxdata:master Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants