Skip to content

Commit

Permalink
Merge pull request #38999 from hashicorp/t-go-1-23-0
Browse files Browse the repository at this point in the history
go: Upgrade to go1.23.0
  • Loading branch information
YakDriver authored Aug 27, 2024
2 parents 99ca8dd + dc34ec3 commit 91220f9
Show file tree
Hide file tree
Showing 420 changed files with 504 additions and 1,337 deletions.
3 changes: 3 additions & 0 deletions .changelog/38999.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:note
provider: Updates to Go 1.23. We do not expect this change to impact most users. For macOS, Go 1.23 requires macOS 11 Big Sur or later; support for previous versions has been discontinued.
```
215 changes: 24 additions & 191 deletions .ci/.golangci2.yml
Original file line number Diff line number Diff line change
@@ -1,135 +1,23 @@
# IMPORTANT: Only add linters whose names start with letters A-M here.
# Linters starting with N-Z should be placed in .golangci3.yml.
issues:
exclude-rules:
- linters:
- paralleltest
text: "Function TestAcc"
- linters:
- tparallel
text: "TestAcc"
- linters:
- unparam
text: "always receives"
# tfsdk: d.GetOkExists
- linters:
- staticcheck
text: "SA1019: \\w+.GetOkExists is deprecated: usage is discouraged due to undefined behaviors and may be removed in a future version of the SDK"
# tfsdk: schema.SchemaValidateFunc
- linters:
- staticcheck
text: "SA1019: schema.SchemaValidateFunc is deprecated: please use SchemaValidateDiagFunc"
# provider: acctest.ConfigAlternateRegionProvider
- linters:
- staticcheck
text: "SA1019: acctest.ConfigAlternateRegionProvider is deprecated: Use ConfigMultipleRegionProvider instead"
# tfsdk: MigrateState
- linters:
- staticcheck
text: "MigrateState is deprecated and any new changes to a resource's schema should be handled by StateUpgraders."
# Legacy CRUD
- linters:
- staticcheck
text: "SA1019: \\w+.\\w+ is deprecated: Use \\w+Context or \\w+WithoutTimeout instead"
# go: strings.Title
- linters:
- staticcheck
text: "SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0"
# Per-Service
- linters:
- staticcheck
path: internal/service/auditmanager/
text: "SA1019: apiObject.AwsServices is deprecated"
- linters:
- staticcheck
path: internal/service/batch/
text: "SA1019: apiObject.ImageId is deprecated: This field is deprecated"
- linters:
- staticcheck
path: internal/service/chime/
text: "SA1019: conn.\\w+ is deprecated: Replaced by \\w+ in the Amazon Chime SDK Voice Namespace"
- linters:
- staticcheck
path: "internal/service/cloudfront"
text: "SA1019: \\w+.(\\w+) is deprecated: This member has been deprecated"
- linters:
- staticcheck
path: "internal/service/cloudtrail"
text: "SA1019: \\w+.(\\w+) is deprecated: This member has been deprecated"
- linters:
- staticcheck
path: internal/service/detective/
text: "SA1019: member.VolumeUsageInBytes is deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead"
- linters:
- staticcheck
path: internal/service/ecr/
text: "SA1019: params.RegistryIds is deprecated: This field is deprecated."
- linters:
- staticcheck
path: "internal/service/firehose"
text: "SA1019: \\w+.(\\w+) is deprecated: (\\w+) has been deprecated"
- linters:
- staticcheck
path: "internal/service/fsx"
text: "SA1019: \\w+.(\\w+) is deprecated: This property is deprecated"
- linters:
- staticcheck
path: internal/service/globalaccelerator/
text: "SA1019: apiObject.IpFamily is deprecated: IpFamily has been replaced by IpAddressFamily"
- linters:
- staticcheck
path: internal/service/guardduty/
text: "SA1019: \\w+.\\w+ is deprecated. This (input|operation|parameter|field) is deprecated"
- linters:
- staticcheck
path: internal/service/identitystore/
text: "SA1019: \\w+.Filters is deprecated: Using filters with List\\w+ API is deprecated"
- linters:
- staticcheck
path: internal/service/kms/
text: "SA1019: [a-zA-Z0-9.]+.CustomerMasterKeySpec is deprecated: This field has been deprecated. Instead, use the KeySpec field"
- linters:
- staticcheck
path: "internal/service/neptune"
text: "SA1019: \\w+.(\\w+) is deprecated:"
- linters:
- staticcheck
path: "internal/service/s3"
text: "SA1019: \\w+.(\\w+) is deprecated: (\\w+) has been deprecated"
- linters:
- staticcheck
path: "internal/service/s3"
text: "SA1019: \\w+.(\\w+) is deprecated: This member has been deprecated"
- linters:
- staticcheck
path: internal/service/securityhub/
text: "SA1019: \\w+.(\\w+) is deprecated:"
- linters:
- staticcheck
path: internal/service/servicediscovery/
text: "SA1019: \\w+.(\\w+) is deprecated:"
- linters:
- staticcheck
path: internal/service/wafv2/
text: "SA1019: \\w+.(\\w+) is deprecated: Deprecated. Use"
- linters:
- staticcheck
path: internal/service/worklink/
text: "SA1019: \\w+.(\\w+) is deprecated: Amazon WorkLink is no longer supported. This will be removed in a future version of the SDK."
max-per-linter: 0
max-same-issues: 0
max-issues-per-linter: 10
max-same-issues: 3

linters:
disable-all: true
enable:
# !! only add a-m linters here, n-z linters go in .golangci3.yml
- asasalint
- asciicheck
- containedctx
- contextcheck
- copyloopvar
- dogsled
- durationcheck
- errcheck
- errname
- errorlint
- exportloopref
- goconst
- gocritic
- gofmt
Expand All @@ -139,31 +27,27 @@ linters:
- makezero
- misspell
- mnd
- nakedret
- nilerr
- nolintlint
- nosprintfhostport
- paralleltest
- predeclared
- revive
- staticcheck
- stylecheck
- tenv
- tparallel
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- whitespace
# - perfsprint
# - thelper

linters-settings:
copyloopvar:
check-alias: true
dogsled:
max-blank-identifiers: 3
errcheck:
ignore: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set,fmt:.*,io:Close
ignore: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set
# "ignore" is deprecated but "exclude-functions" doesn't seem to work or the syntax is non-obvious.
# https://github.com/kisielk/errcheck#excluding-functions
# Under exclude-functions are the various attempts at getting it to work, all of which result in d.Set being linted everywhere.
# exclude-functions:
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.ResourceData.Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set,io:Close
# - (github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.ResourceData).Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.Set
# - io:Close
errorlint:
errorf: false
goconst:
Expand All @@ -173,10 +57,10 @@ linters-settings:
enabled-tags:
- diagnostic
disabled-tags:
- style
- performance
- experimental
- opinionated
- performance
- style
mnd:
checks:
- argument
Expand Down Expand Up @@ -210,57 +94,6 @@ linters-settings:
- strconv.ParseFloat
- strconv.ParseInt
- strings.SplitN
nolintlint:
allow-unused: false
allow-leading-space: false
require-explanation: true
require-specific: true
allow-no-explanation:
- mnd
- paralleltest
- tparallel
- unparam
predeclared:
ignore: cap,close,copy,delete,len,new
revive:
# Recommended configuration.
# See https://github.com/mgechev/revive#recommended-configuration.
ignore-generated-header: true
severity: warning
confidence: 0.8
error-code: 0
warning-code: 0
rules:
- name: atomic
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: empty-block
- name: error-naming
- name: error-return
# - name: error-strings
- name: errorf
# - name: exported
# - name: if-return
# - name: increment-decrement
# - name: indent-error-flow
- name: package-comments
- name: range
- name: receiver-naming
# - name: redefines-builtin-id
- name: superfluous-else
- name: time-naming
# - name: unexported-return
- name: unreachable-code
# - name: unused-parameter
- name: var-declaration
# - name: var-naming
staticcheck:
checks: ["all"]
stylecheck:
checks: ["all", "-ST1005", "-ST1003"]
initialisms: ["ACL", "ACM", "ACMPCA", "ACMPCA", "AMI", "API", "APIGateway", "AppConfig", "AppMesh", "AppSync", "ARN", "ASG", "ASN", "AutoScaling", "BGP", "BYOIP", "CIDR", "CloudFormation", "CloudFront", "CloudWatch", "CMK", "CNAME", "CoIP", "CPU", "CSS", "CSV", "DAX", "DB", "DHCP", "DKIM", "DLM", "DMS", "DNS", "DNSSEC", "DocDB", "DocDB", "DynamoDB", "DynamoDB", "EBS", "EC2", "ECMP", "ECR", "ECS", "EFS", "EIP", "EKS", "ElastiCache", "Elasticsearch", "ELB", "EMR", "FIFO", "FMS", "FQDNS", "FSx", "FSx", "GameLift", "GCM", "GP2", "GP3", "GraphQL", "GRPC", "GuardDuty", "HAProxy", "HSM", "HTTP", "HTTPS", "HVM", "IAM", "IoT", "IP", "IPAM", "IPSet", "iSCSI", "JDBC", "JSON", "KMS", "MFA", "MSK", "MWAA", "MySQL", "NFS", "OAuth", "OIDC", "OpsWorks", "PHP", "PITR", "POSIX", "PreCheck", "QLDB", "RabbitMQ", "RDS", "RFC", "SageMaker", "SASL", "SFN", "SMB", "SMS", "SMTP", "SNS", "SQL", "SQS", "SSH", "SSL", "SSM", "SSO", "STS", "SWF", "TCP", "TLS", "TTL", "URI", "URL", "VGW", "VoIP", "VPC", "VPN", "WAF", "WAFV2", "WorkGroup", "WorkLink", "WorkSpaces", "XRay", "XSS", "YAML"]

run:
timeout: 75m
Loading

0 comments on commit 91220f9

Please sign in to comment.