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: update golangci-lint configuration #1426

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tenthirtyam
Copy link
Collaborator

@tenthirtyam tenthirtyam commented Oct 12, 2024

Summary of Pull Request

Updates golangci-lint configuration.

Type of Pull Request

  • This is a bug fix.
  • This is an enhancement or feature.
  • This is a code style/formatting update.
  • This is a documentation update.
  • This is a refactoring update.
  • This is a chore update
  • This is something else.
    Please describe:

Related to Existing Issues

Test and Documentation Coverage

For bug fixes or features:

  • Tests have been completed.
  • Documentation has been added/updated.

BEFORE:

golangci-lint run
WARN [config_reader] The configuration option `linters.errcheck.ignore` is deprecated, please use `linters.errcheck.exclude-functions`. 

AFTER:

golangci-lint run
nsxt/resource_nsxt_policy_project_test.go:572:6: func `testAccNsxtPolicyProjectTemplateWithIPBlock` is unused (unused)
func testAccNsxtPolicyProjectTemplateWithIPBlock(displayName string) string {
     ^

Breaking Changes?

  • Yes, there are breaking changes.
  • No, there are no breaking changes.

@tenthirtyam tenthirtyam added technical-debt Technical Debt chore Chore labels Oct 12, 2024
@tenthirtyam tenthirtyam requested a review from annakhm October 12, 2024 04:08
@tenthirtyam tenthirtyam self-assigned this Oct 12, 2024
@tenthirtyam tenthirtyam added needs-review Needs Review size/s Relative Sizing: small labels Oct 12, 2024
@tenthirtyam tenthirtyam requested a review from a team October 21, 2024 11:59
@tenthirtyam tenthirtyam removed the request for review from annakhm October 28, 2024 21:33
@tenthirtyam
Copy link
Collaborator Author

@vmware/terraform-provider-nsxt-maintainers: reminder.

@tenthirtyam tenthirtyam force-pushed the chore/update-golangci-lint- branch from d0f360c to 1352b98 Compare January 8, 2025 14:51
@salv-orlando
Copy link
Member

@tenthirtyam I apologise if this is a dumb question, but looking at the "after" behaviour, will this change start reporting linter errors for rules we have excluded such as G115 and G402?

@tenthirtyam
Copy link
Collaborator Author

Likely. I can update these new format to account for this for you.

@tenthirtyam tenthirtyam force-pushed the chore/update-golangci-lint- branch from 1352b98 to 94965dc Compare January 8, 2025 18:32
Updates `golangci-lint` configuration.

Signed-off-by: Ryan Johnson <[email protected]>
@tenthirtyam tenthirtyam force-pushed the chore/update-golangci-lint- branch from 94965dc to 6b7935e Compare January 8, 2025 19:14
@tenthirtyam
Copy link
Collaborator Author

@salv-orlando - I've updated the config again in 6b7935e and have verified that those existing exlusions for gosec and staticcheck will continue to be excluded.

➜ golangci-lint run
nsxt/resource_nsxt_policy_project_test.go:572:6: func `testAccNsxtPolicyProjectTemplateWithIPBlock` is unused (unused)
func testAccNsxtPolicyProjectTemplateWithIPBlock(displayName string) string {
     ^

And the above is addressed in #1499 by @ksamoray

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chore needs-review Needs Review size/s Relative Sizing: small technical-debt Technical Debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants