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/m* #10006

Merged
merged 2 commits into from
Nov 2, 2021
Merged

fix: Linter fixes for plugins/inputs/m* #10006

merged 2 commits into from
Nov 2, 2021

Conversation

zak-pawel
Copy link
Collaborator

Following findings were fixed:

plugins/inputs/mailchimp/chimp_api.go:8:2           revive         imports-blacklist: should not use the following blacklisted import: "log"
plugins/inputs/marklogic/marklogic.go:166:66        revive         import-shadowing: The name 'url' shadows an import name
plugins/inputs/marklogic/marklogic.go:228:36        revive         import-shadowing: The name 'url' shadows an import name
plugins/inputs/mcrouter/mcrouter.go:149:1           revive         confusing-results: unnamed results of the same type may be confusing, consider using named results
plugins/inputs/mesos/mesos.go:25:2                  staticcheck    SA9004: only the first constant in this group has an explicit type
plugins/inputs/mesos/mesos.go:7:2                   revive         imports-blacklist: should not use the following blacklisted import: "log"
plugins/inputs/minecraft/client.go:48:2             revive         import-shadowing: The name 'rcon' shadows an import name
plugins/inputs/mongodb/mongostat.go:1314:13         revive         superfluous-else: if block ends with a break statement, so drop this else and outdent its block
plugins/inputs/mongodb/mongostat.go:906:1           revive         confusing-results: unnamed results of the same type may be confusing, consider using named results
plugins/inputs/monit/monit.go:17:2                  staticcheck    SA9004: only the first constant in this group has an explicit type
plugins/inputs/monit/monit.go:247:2                 revive         early-return: if c {...} else {... return } can be simplified to if !c { ... return } ...
plugins/inputs/mqtt_consumer/mqtt_consumer.go:75:2  revive         confusing-naming: Field 'topicTag' differs only by capitalization to other field in the struct type MQTTConsumer
plugins/inputs/mysql/mysql.go:1819:3                revive         defer: prefer not to defer inside loops
plugins/inputs/mysql/mysql.go:947:27                sqlclosecheck  Rows/Stmt was not closed

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

@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.

Thanks @zak-pawel! Only two minor comments/suggestions. Feel free to ignore them if you don't like them. :-)

plugins/inputs/mailchimp/mailchimp.go Outdated Show resolved Hide resolved
plugins/inputs/mcrouter/mcrouter_test.go Outdated Show resolved Hide resolved
@srebhan srebhan self-assigned this Oct 27, 2021
@telegraf-tiger
Copy link
Contributor

🥳 This pull request decreases the Telegraf binary size by -0.01 % for linux amd64 (new size: 132.1 MB, nightly size 132.1 MB)

📦 Looks like new artifacts were built from this PR.

Expand this list to get them here! 🐯

Artifact URLs

DEB RPM TAR GZ ZIP
amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip
arm64.deb armel.rpm freebsd_amd64.tar.gz windows_i386.zip
armel.deb armv6hl.rpm freebsd_armv7.tar.gz
armhf.deb i386.rpm freebsd_i386.tar.gz
i386.deb ppc64le.rpm linux_amd64.tar.gz
mips.deb s390x.rpm linux_arm64.tar.gz
mipsel.deb x86_64.rpm linux_armel.tar.gz
ppc64el.deb linux_armhf.tar.gz
s390x.deb linux_i386.tar.gz
linux_mips.tar.gz
linux_mipsel.tar.gz
linux_ppc64le.tar.gz
linux_s390x.tar.gz
static_linux_amd64.tar.gz

Copy link
Member

@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.

LGTM. Thank you @zak-pawel for silencing another bunch of those...

@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 Oct 27, 2021
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks for this! There are a couple of logic-like changes where you moved functions around, but I think it all still looks good. Thanks again!

@powersj powersj merged commit c1d4ce4 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 linter 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.

3 participants