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: Fix linter findings for revive:max-public-structs in plugins/inputs/[t-z]* and rest #15879

Merged

Conversation

zak-pawel
Copy link
Collaborator

Summary

Address following findings for revive:max-public-structs in plugins/inputs/[t-z]* and rest:

plugins/inputs/tomcat/tomcat.go:2:1                                    revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/inputs/webhooks/artifactory/artifactory_webhook_models.go:1:1  revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/inputs/webhooks/github/github_webhooks_models.go:1:1           revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/inputs/webhooks/rollbar/rollbar_webhooks_events.go:1:1         revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/inputs/win_eventlog/event.go:6:1                               revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/inputs/win_perf_counters/pdh_amd64.go:33:1                     revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/inputs/win_perf_counters/performance_query.go:4:1              revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/inputs/win_services/win_services.go:4:1                        revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/inputs/xtremio/xtremio_types.go:1:1                            revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/inputs/zipkin/codec/codec.go:1:1                               revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/outputs/influxdb/http.go:1:1                                   revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/outputs/sensu/sensu.go:2:1                                     revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/parsers/json_v2/parser.go:1:1                                  revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/parsers/wavefront/element.go:1:1                               revive  max-public-structs: you have exceeded the maximum number of public struct declarations
plugins/serializers/prometheus/collection.go:1:1                       revive  max-public-structs: you have exceeded the maximum number of public struct declarations

As proposed here #15822, we will fix the errors found by the following configuration:

      - name: max-public-structs
        exclude: ["TEST"]
        arguments: [5]

  # Excluding configuration per-path, per-linter, per-text and per-source
  exclude-rules:
    - path-except: ^plugins/(aggregators|inputs|outputs|parsers|processors|serializers)/...
      text: "max-public-structs: you have exceeded the maximum number of public struct declarations"

It is only part of the bigger job.
After all findings of this type in whole project are handled, we can enable revive:max-public-structs rule in golangci-lint.

Checklist

  • No AI generated code was used in this PR

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!

@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 Sep 16, 2024
@srebhan srebhan removed their assignment Sep 16, 2024
@DStrand1 DStrand1 merged commit 8d282ab into influxdata:master Sep 16, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.32.1 milestone Sep 16, 2024
srebhan pushed a commit that referenced this pull request Oct 7, 2024
asaharn pushed a commit to asaharn/telegraf that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore 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