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

enable s20 lint check and fix issues #12674

Conversation

breathingdust
Copy link
Member

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #11865

Release note for CHANGELOG:

NONE

Previously:

make lint
==> Checking source code against linters...
aws/resource_aws_ami.go:171:28: S020: schema should not only enable Computed and enable ForceNew
aws/resource_aws_ami_copy.go:145:28: S020: schema should not only enable Computed and enable ForceNew
aws/resource_aws_ami_from_instance.go:132:28: S020: schema should not only enable Computed and enable ForceNew
aws/resource_aws_inspector_assessment_template.go:35:11: S020: schema should not only enable Computed and enable ForceNew
make: *** [lint] Error 3

After change:

make lint
==> Checking source code against linters...

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSAMI'

--- PASS: TestAccAWSAMI_disappears (41.62s)
--- PASS: TestAccAWSAMI_snapshotSize (46.45s)
--- PASS: TestAccAWSAMI_basic (46.89s)
--- PASS: TestAccAWSAMI_tags (87.42s)
--- PASS: TestAccAWSAMILaunchPermission_Basic (337.21s)
--- PASS: TestAccAWSAMILaunchPermission_Disappears_LaunchPermission_Public (338.10s)
--- PASS: TestAccAWSAMILaunchPermission_Disappears_LaunchPermission (338.52s)
--- PASS: TestAccAWSAMILaunchPermission_Disappears_AMI (350.66s)
--- PASS: TestAccAWSAMICopy_basic (364.83s)
--- PASS: TestAccAWSAMIFromInstance_basic (368.12s)
--- PASS: TestAccAWSAMICopy_Description (375.57s)
--- PASS: TestAccAWSAMICopy_EnaSupport (381.75s)
--- PASS: TestAccAWSAMICopy_tags (390.73s)
--- PASS: TestAccAWSAMIFromInstance_tags (408.77s)

make testacc TESTARGS='-run=TestAccAWSInspectorTemplate'

--- PASS: TestAccAWSInspectorTemplate_disappears (20.64s)
--- PASS: TestAccAWSInspectorTemplate_basic (20.92s)
--- PASS: TestAccAWSInspectorTemplate_tags (62.82s)

@breathingdust breathingdust requested a review from a team April 4, 2020 05:00
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/ec2 Issues and PRs that pertain to the ec2 service. service/inspector Issues and PRs that pertain to the inspector service. labels Apr 4, 2020
@bflad bflad added technical-debt Addresses areas of the codebase that need refactoring or redesign. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 6, 2020
@bflad bflad self-assigned this Apr 6, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Looks good 🚀

Output from acceptance testing:

--- PASS: TestAccAWSAMI_basic (48.63s)
--- PASS: TestAccAWSAMI_disappears (43.04s)
--- PASS: TestAccAWSAMI_snapshotSize (47.94s)
--- PASS: TestAccAWSAMI_tags (60.32s)

--- PASS: TestAccAWSAMICopy_basic (360.57s)
--- PASS: TestAccAWSAMICopy_Description (365.92s)
--- PASS: TestAccAWSAMICopy_EnaSupport (360.58s)
--- PASS: TestAccAWSAMICopy_tags (370.82s)

--- PASS: TestAccAWSAMIFromInstance_basic (367.53s)
--- PASS: TestAccAWSAMIFromInstance_tags (353.71s)

--- PASS: TestAccAWSInspectorTemplate_basic (11.70s)
--- PASS: TestAccAWSInspectorTemplate_disappears (11.66s)
--- PASS: TestAccAWSInspectorTemplate_tags (27.07s)

@bflad bflad assigned breathingdust and unassigned bflad Apr 6, 2020
@breathingdust breathingdust added this to the v2.57.0 milestone Apr 8, 2020
@breathingdust breathingdust merged commit 58ced79 into hashicorp:master Apr 8, 2020
@breathingdust breathingdust deleted the td-fix-and-enable-s20-lint-check branch April 8, 2020 03:35
@ghost
Copy link

ghost commented Apr 10, 2020

This has been released in version 2.57.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 for triage. Thanks!

@ghost
Copy link

ghost commented May 8, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators May 8, 2020
@breathingdust breathingdust added the linter Pertains to changes to or issues with the various linters. label Oct 27, 2020
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. service/ec2 Issues and PRs that pertain to the ec2 service. service/inspector Issues and PRs that pertain to the inspector service. size/XS Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix and enable tfproviderlint S020 check: schema should not combine Computed only with ForceNew
2 participants