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 exportloopref Linting Issues and Enable in CI Testing #10241

Closed
2 tasks
bflad opened this issue Sep 25, 2019 · 3 comments · Fixed by #24705
Closed
2 tasks

Fix exportloopref Linting Issues and Enable in CI Testing #10241

bflad opened this issue Sep 25, 2019 · 3 comments · Fixed by #24705
Labels
linter Pertains to changes to or issues with the various linters. provider Pertains to the provider itself, rather than any interaction with AWS. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Sep 25, 2019

Description

exportloopref finds exporting pointers for loop variables.

$ golangci-lint --max-issues-per-linter 0 --enable exportloopref run ./aws
aws/resource_aws_glue_dev_endpoint.go:415:37: exporting a pointer for the loop variable k (exportloopref)
			removeKeys = append(removeKeys, &k)
			                                 ^
aws/resource_aws_proxy_protocol_policy.go:214:39: exporting a pointer for the loop variable policy (exportloopref)
			newPolicies = append(newPolicies, &policy)
			                                   ^
aws/resource_aws_proxy_protocol_policy.go:240:40: exporting a pointer for the loop variable p (exportloopref)
				newPolicies = append(newPolicies, &p)
				                                   ^

Definition of Done

  • Fix existing exportloopref reports
  • Add exportloopref to .golangci.yml and ensure CI passes

References

@bflad bflad added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. technical-debt Addresses areas of the codebase that need refactoring or redesign. provider Pertains to the provider itself, rather than any interaction with AWS. labels Sep 25, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Sep 25, 2019
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Sep 25, 2019
@breathingdust breathingdust added the linter Pertains to changes to or issues with the various linters. label Oct 27, 2020
@bflad
Copy link
Contributor Author

bflad commented Mar 30, 2021

Updating for exportloopref due to golangci/golangci-lint#1041

@bflad bflad changed the title Fix scopelint Linting Issues and Enable in CI Testing Fix exportloopref Linting Issues and Enable in CI Testing Mar 30, 2021
@github-actions github-actions bot added this to the v4.14.0 milestone May 9, 2022
@github-actions
Copy link

This functionality has been released in v4.14.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linter Pertains to changes to or issues with the various linters. provider Pertains to the provider itself, rather than any interaction with AWS. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
2 participants