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 and enable tfproviderlint S018 check: Use TypeList and MaxItems: 1 #9956

Closed
28 tasks done
ryndaniels opened this issue Sep 2, 2019 · 2 comments · Fixed by #13334 or #13335
Closed
28 tasks done

Fix and enable tfproviderlint S018 check: Use TypeList and MaxItems: 1 #9956

ryndaniels opened this issue Sep 2, 2019 · 2 comments · Fixed by #13334 or #13335
Assignees
Labels
linter Pertains to changes to or issues with the various linters. technical-debt Addresses areas of the codebase that need refactoring or redesign.

Comments

@ryndaniels
Copy link
Contributor

ryndaniels commented Sep 2, 2019

Description

As per tfproviderlint check S018, we want to make sure that schemas use Type: TypeList and MaxItems: 1 if possible.

Failing example:

&schema.Schema{
    MaxItems: 1,
    Type:     schema.TypeSet,
}

Should become:

&schema.Schema{
    MaxItems: 1,
    Type:     schema.TypeList,
}

Affected Files

  • GNUMakefile
  • aws/provider.go
  • aws/resource_aws_api_gateway_usage_plan.go
  • aws/resource_aws_api_gateway_usage_plan_test.go
  • aws/resource_aws_api_gateway_vpc_link.go
  • aws/resource_aws_appmesh_virtual_node.go
  • aws/resource_aws_appmesh_virtual_router.go
  • aws/resource_aws_cloudfront_distribution.go
  • aws/resource_aws_codebuild_project_test.go
  • aws/resource_aws_ecs_service.go
  • aws/resource_aws_eks_node_group.go
  • aws/resource_aws_elastic_transcoder_pipeline.go
  • aws/resource_aws_elastic_transcoder_preset.go
  • aws/resource_aws_fsx_lustre_file_system.go
  • aws/resource_aws_fsx_windows_file_system.go
  • aws/resource_aws_kinesis_firehose_delivery_stream.go
  • aws/resource_aws_s3_bucket.go
  • aws/resource_aws_s3_bucket_test.go
  • aws/resource_aws_ses_event_destination.go
  • aws/resource_aws_vpc_peering_connection.go
  • aws/resource_aws_vpc_peering_connection_test.go
  • aws/resource_aws_waf_sql_injection_match_set.go
  • aws/resource_aws_waf_sql_injection_match_set_test.go
  • aws/resource_aws_waf_web_acl.go
  • aws/resource_aws_waf_web_acl_test.go
  • aws/waf_helpers.go
  • aws/resource_aws_waf_byte_match_set.go
  • aws/resource_aws_waf_byte_match_set_test.go

Definition of Done

  • In GNUmakefile, add -S018 to tfproviderlint command under lint target and have TravisCI testing pass
@ryndaniels ryndaniels added the technical-debt Addresses areas of the codebase that need refactoring or redesign. label Sep 2, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Sep 2, 2019
@ryndaniels ryndaniels removed the needs-triage Waiting for first response or review from a maintainer. label Sep 2, 2019
@bflad bflad changed the title Remove extraneous MinItems and MaxItems from schemas that dont need them Fix and enable tfproviderlint S018 check: Remove extraneous MinItems and MaxItems from schemas that dont need them Feb 3, 2020
bflad added a commit that referenced this issue Feb 3, 2020
Gaps in `tfproviderlint` checking are covered by the following issues:

Reference: #9950 (fix and enable AT003)
Reference: #11862 (fix and enable AT005)
Reference: #9951 (fix and enable R001)
Reference: #9952 (fix and enable R002)
Reference: #9953 (fix and enable R003)
Reference: #9954 (fix and enable R004)
Reference: #11863 (fix and enable R005)
Reference: #11864 (fix and enable R006)
Reference: #9955 (fix and enable S006)
Reference: #9956 (fix and enable S018)
Reference: #11865 (fix and enable S020)
Reference: #11866 (fix and enable S022)
Reference: #11867 (fix and enable S023)
Reference: #11868 (fix and enable S024)
Reference: #11869 (fix and enable S031)
Reference: #11870 (fix and enable S032)
Reference: #11871 (fix and enable S033)
Reference: #11872 (fix and enable V001)
Reference: #11844 (fix and enable V002, V004, V005, V007, V008)
bflad added a commit that referenced this issue Feb 4, 2020
Gaps in `tfproviderlint` checking are covered by the following issues:

Reference: #9950 (fix and enable AT003)
Reference: #11862 (fix and enable AT005)
Reference: #9951 (fix and enable R001)
Reference: #9952 (fix and enable R002)
Reference: #9953 (fix and enable R003)
Reference: #9954 (fix and enable R004)
Reference: #11863 (fix and enable R005)
Reference: #11864 (fix and enable R006)
Reference: #9955 (fix and enable S006)
Reference: #9956 (fix and enable S018)
Reference: #11865 (fix and enable S020)
Reference: #11866 (fix and enable S022)
Reference: #11867 (fix and enable S023)
Reference: #11868 (fix and enable S024)
Reference: #11869 (fix and enable S031)
Reference: #11870 (fix and enable S032)
Reference: #11871 (fix and enable S033)
Reference: #11872 (fix and enable V001)
Reference: #11844 (fix and enable V002, V004, V005, V007, V008)
bflad added a commit that referenced this issue Feb 19, 2020
Reference: #12074

Gaps in `tfproviderlint`/`awsproviderlint` checking are covered by the following issues:

Reference: #11888 (fix and enable AWSAT001)
Reference: #9950 (fix and enable AT003)
Reference: #11862 (fix and enable AT005)
Reference: #9951 (fix and enable R001)
Reference: #9952 (fix and enable R002)
Reference: #9953 (fix and enable R003)
Reference: #11863 (fix and enable R005)
Reference: #11864 (fix and enable R006)
Reference: #12083 (fix and enable R007, R008)
Reference: #9955 (fix and enable S006)
Reference: #9956 (fix and enable S018)
Reference: #11865 (fix and enable S020)
Reference: #11866 (fix and enable S022)
Reference: #11867 (fix and enable S023)
Reference: #11868 (fix and enable S024)
Reference: #11869 (fix and enable S031)
Reference: #11870 (fix and enable S032)
Reference: #11871 (fix and enable S033)
Reference: #11872 (fix and enable V001)
Reference: #11844 (fix and enable V002, V004, V005, V007, V008)
bflad added a commit that referenced this issue Mar 10, 2020
Reference: #12074

Gaps in `tfproviderlint`/`awsproviderlint` checking are covered by the following issues:

Reference: #11888 (fix and enable AWSAT001)
Reference: #9950 (fix and enable AT003)
Reference: #11862 (fix and enable AT005)
Reference: #9951 (fix and enable R001)
Reference: #9952 (fix and enable R002)
Reference: #9953 (fix and enable R003)
Reference: #11863 (fix and enable R005)
Reference: #11864 (fix and enable R006)
Reference: #12083 (fix and enable R007, R008)
Reference: #9955 (fix and enable S006)
Reference: #9956 (fix and enable S018)
Reference: #11865 (fix and enable S020)
Reference: #11866 (fix and enable S022)
Reference: #11867 (fix and enable S023)
Reference: #11868 (fix and enable S024)
Reference: #11869 (fix and enable S031)
Reference: #11870 (fix and enable S032)
Reference: #11871 (fix and enable S033)
Reference: #11872 (fix and enable V001)
Reference: #11844 (fix and enable V002, V004, V005, V007, V008)
@bflad bflad changed the title Fix and enable tfproviderlint S018 check: Remove extraneous MinItems and MaxItems from schemas that dont need them Fix and enable tfproviderlint S018 check: Use TypeList and MaxItems: 1 Mar 31, 2020
@anGie44 anGie44 self-assigned this Apr 29, 2020
@ewbankkit
Copy link
Contributor

@ghost
Copy link

ghost commented Jul 6, 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 Jul 6, 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. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
4 participants