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

fix: Linter fixes for plugins/inputs/[n-o]* #10011

Merged
merged 2 commits into from
Nov 2, 2021
Merged

fix: Linter fixes for plugins/inputs/[n-o]* #10011

merged 2 commits into from
Nov 2, 2021

Conversation

zak-pawel
Copy link
Collaborator

Following findings were fixed:

plugins/inputs/nats/nats.go:44:2                                    revive       import-shadowing: The name 'url' shadows an import name
plugins/inputs/neptune_apex/neptune_apex.go:248:8                   revive       unexported-naming: the symbol TimeLayout is local, its name should start with a lowercase letter
plugins/inputs/net_response/net_response.go:123:4                   revive       unexported-naming: the symbol RegEx is local, its name should start with a lowercase letter
plugins/inputs/net_response/net_response.go:189:2                   revive       unexported-naming: the symbol RegEx is local, its name should start with a lowercase letter
plugins/inputs/net_response/net_response.go:19:2                    staticcheck  SA9004: only the first constant in this group has an explicit type
plugins/inputs/net_response/net_response.go:242:9                   revive       early-return: if c {...} else {... return } can be simplified to if !c { ... return } ...
plugins/inputs/nginx_plus_api/nginx_plus_api_metrics.go:52:2        revive       import-shadowing: The name 'url' shadows an import name
plugins/inputs/nginx_upstream_check/nginx_upstream_check.go:124:49  revive       import-shadowing: The name 'url' shadows an import name
plugins/inputs/nginx_upstream_check/nginx_upstream_check.go:190:51  revive       import-shadowing: The name 'url' shadows an import name
plugins/inputs/nsd/nsd.go:64:71                                     revive       unexported-naming: the symbol Server is local, its name should start with a lowercase letter
plugins/inputs/nsq_consumer/nsq_consumer_test.go:100:3              revive       deep-exit: calls to log.Fatalf only in main() or init() functions
plugins/inputs/nsq_consumer/nsq_consumer_test.go:142:3              revive       deep-exit: calls to log.Fatalf only in main() or init() functions
plugins/inputs/nsq_consumer/nsq_consumer_test.go:174:6              staticcheck  SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead
plugins/inputs/nsq_consumer/nsq_consumer_test.go:181:6              staticcheck  SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead
plugins/inputs/nsq_consumer/nsq_consumer_test.go:79:2               gosimple     S1000: should use for range instead of for { select {} }
plugins/inputs/nstat/nstat.go:141:11                                revive       superfluous-else: if block ends with a continue statement, so drop this else and outdent its block
plugins/inputs/nstat/nstat.go:179:12                                revive       superfluous-else: if block ends with a continue statement, so drop this else and outdent its block
plugins/inputs/ntpq/ntpq.go:53:14                                   gosimple     S1007: should use raw string (`...`) with regexp.Compile to avoid having to escape twice
plugins/inputs/opcua/opcua_client.go:245:3                          revive       unnecessary-stmt: omit unnecessary break at the end of case clause
plugins/inputs/opcua/opcua_client.go:252:3                          revive       unnecessary-stmt: omit unnecessary break at the end of case clause
plugins/inputs/opcua/opcua_client.go:387:4                          revive       unnecessary-stmt: omit unnecessary break at the end of case clause
plugins/inputs/openldap/openldap.go:119:10                          revive       early-return: if c {...} else {... return } can be simplified to if !c { ... return } ...
plugins/inputs/openweathermap/openweathermap.go:42:2                revive       confusing-naming: Field 'baseURL' differs only by capitalization to other field in the struct type OpenWeatherMap

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

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Very nice round @zak-pawel! Only one cosmetic comment.

plugins/inputs/openweathermap/openweathermap.go Outdated Show resolved Hide resolved
@srebhan srebhan self-assigned this Oct 28, 2021
Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Perfect. Thank you @zak-pawel!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Nov 1, 2021
@powersj powersj merged commit e6b107b into influxdata:master Nov 2, 2021
powersj pushed a commit that referenced this pull request Nov 17, 2021
VladislavSenkevich pushed a commit to gwos/telegraf that referenced this pull request Nov 23, 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 ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants