-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Re-Enable unparam Linter #13278
Comments
Reference: #13278 Previously: ``` aws/resource_aws_api_gateway_base_path_mapping_test.go:124:56: `testAccCheckAWSAPIGatewayBasePathExists` - `name` is unused (unparam) func testAccCheckAWSAPIGatewayBasePathExists(n string, name string, res *apigateway.BasePathMapping) resource.TestCheckFunc { ^ aws/resource_aws_athena_database.go:67:126: expandAthenaResultConfiguration - result 1 (error) is always nil (unparam) func expandAthenaResultConfiguration(bucket string, encryptionConfigurationList []interface{}) (*athena.ResultConfiguration, error) { ^ aws/resource_aws_cloudtrail_test.go:552:67: `testAccCheckCloudTrailLoggingEnabled` - `trail` is unused (unparam) func testAccCheckCloudTrailLoggingEnabled(n string, desired bool, trail *cloudtrail.Trail) resource.TestCheckFunc { ^ aws/resource_aws_ecs_cluster_test.go:494:58: `testAccAWSEcsClusterCapacityProvidersFargate` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargate(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:510:62: `testAccAWSEcsClusterCapacityProvidersFargateSpot` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateSpot(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:526:62: `testAccAWSEcsClusterCapacityProvidersFargateBoth` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateBoth(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:542:68: `testAccAWSEcsClusterCapacityProvidersFargateNoStrategy` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateNoStrategy(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:552:72: `testAccAWSEcsClusterCapacityProvidersFargateSpotNoStrategy` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateSpotNoStrategy(rName, providerName string) string { ^ aws/resource_aws_ecs_task_definition.go:611:93: expandEcsInferenceAccelerators - result 1 (error) is always nil (unparam) func expandEcsInferenceAccelerators(configured []interface{}) ([]*ecs.InferenceAccelerator, error) { ^ aws/resource_aws_eip_association_test.go:233:61: `testAccCheckAWSEIPAssociationHasIpBasedId` - `res` is unused (unparam) func testAccCheckAWSEIPAssociationHasIpBasedId(name string, res *ec2.Address) resource.TestCheckFunc { ^ aws/resource_aws_inspector_resource_group_test.go:72:53: `testAccCheckAWSInspectorResourceGroupRecreated` - `t` is unused (unparam) func testAccCheckAWSInspectorResourceGroupRecreated(t *testing.T, v1, v2 *inspector.ResourceGroup) resource.TestCheckFunc { ^ aws/resource_aws_instance_migrate.go:79:56: writeV1BlockDevice - result 0 (error) is always nil (unparam) is *terraform.InstanceState, oldBd map[string]string) error { ^ aws/resource_aws_kinesis_analytics_application.go:1088:96: createApplicationUpdateOpts - result 1 (error) is always nil (unparam) func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { ^ aws/resource_aws_kinesis_video_stream_test.go:167:68: `testAccCheckKinesisVideoStreamDisappears` - `stream` is unused (unparam) func testAccCheckKinesisVideoStreamDisappears(resourceName string, stream *kinesisvideo.StreamInfo) resource.TestCheckFunc { ^ aws/resource_aws_lambda_function_test.go:2375:56: `testAccAWSLambdaConfigWithDeadLetterConfigUpdated` - `funcName` is unused (unparam) func testAccAWSLambdaConfigWithDeadLetterConfigUpdated(funcName, topic1Name, topic2Name, policyName, ^ aws/resource_aws_lambda_permission_test.go:544:53: `testAccAWSLambdaPermissionDisappears` - `statement` is unused (unparam) func testAccAWSLambdaPermissionDisappears(n string, statement *LambdaPolicyStatement) resource.TestCheckFunc { ^ aws/resource_aws_lightsail_key_pair_test.go:178:63: `testAccAWSLightsailKeyPairConfig_imported` - `key` is unused (unparam) func testAccAWSLightsailKeyPairConfig_imported(lightsailName, key string) string { ^ aws/resource_aws_main_route_table_association_test.go:73:2: `testAccCheckMainRouteTableAssociation` - `routeTableResource` is unused (unparam) routeTableResource string) resource.TestCheckFunc { ^ ``` Output from acceptance testing: ``` (TestAccAWSAPIGatewayBasePathMapping_|TestAccAWSAthenaDatabase_|TestAccAWSCloudTrail/Trail/enableLogging|TestAccAWSEcsCluster_CapacityProviders|TestAccAWSEcsTaskDefinition_|TestAccAWSInspectorResourceGroup_basic|TestAccAWSKinesisAnalyticsApplication_|TestAccAWSKinesisVideoStream_disappears|TestAccAWSLambdaFunction_DeadLetterConfigUpdated|TestAccAWSLambdaPermission_disappears|TestAccAWSLightsailKeyPair_publicKey|TestAccAWSMainRouteTableAssociation_basic) --- PASS: TestAccAWSAPIGatewayBasePathMapping_BasePath_Empty (54.58s) --- PASS: TestAccAWSAPIGatewayBasePathMapping_basic (55.48s) --- PASS: TestAccAWSAthenaDatabase_basic (60.51s) --- PASS: TestAccAWSAthenaDatabase_destroyFailsIfTablesExist (73.58s) --- PASS: TestAccAWSAthenaDatabase_encryption (71.05s) --- PASS: TestAccAWSAthenaDatabase_forceDestroyAlwaysSucceeds (65.41s) --- PASS: TestAccAWSAthenaDatabase_nameCantHaveUppercase (1.46s) --- PASS: TestAccAWSAthenaDatabase_nameStartsWithUnderscore (61.23s) --- PASS: TestAccAWSCloudTrail/Trail/enableLogging (105.77s) --- PASS: TestAccAWSEcsCluster_CapacityProviders (48.45s) --- PASS: TestAccAWSEcsCluster_CapacityProvidersNoStrategy (53.69s) --- PASS: TestAccAWSEcsCluster_CapacityProvidersUpdate (81.22s) --- PASS: TestAccAWSEcsTaskDefinition_arrays (16.36s) --- PASS: TestAccAWSEcsTaskDefinition_basic (26.60s) --- PASS: TestAccAWSEcsTaskDefinition_changeVolumesForcesNewResource (26.89s) --- PASS: TestAccAWSEcsTaskDefinition_constraint (16.28s) --- PASS: TestAccAWSEcsTaskDefinition_ExecutionRole (16.69s) --- PASS: TestAccAWSEcsTaskDefinition_Fargate (21.81s) --- PASS: TestAccAWSEcsTaskDefinition_Inactive (25.92s) --- PASS: TestAccAWSEcsTaskDefinition_inferenceAccelerator (14.07s) --- PASS: TestAccAWSEcsTaskDefinition_ProxyConfiguration (26.41s) --- PASS: TestAccAWSEcsTaskDefinition_Tags (45.91s) --- PASS: TestAccAWSEcsTaskDefinition_withDockerVolume (16.00s) --- PASS: TestAccAWSEcsTaskDefinition_withDockerVolumeMinimalConfig (16.27s) --- PASS: TestAccAWSEcsTaskDefinition_withEcsService (91.23s) --- PASS: TestAccAWSEcsTaskDefinition_withEFSVolume (27.55s) --- PASS: TestAccAWSEcsTaskDefinition_withEFSVolumeMinimal (27.70s) --- PASS: TestAccAWSEcsTaskDefinition_withIPCMode (16.69s) --- PASS: TestAccAWSEcsTaskDefinition_withNetworkMode (16.85s) --- PASS: TestAccAWSEcsTaskDefinition_withPidMode (18.24s) --- PASS: TestAccAWSEcsTaskDefinition_withScratchVolume (15.69s) --- PASS: TestAccAWSEcsTaskDefinition_withTaskRoleArn (16.75s) --- PASS: TestAccAWSEcsTaskDefinition_withTaskScopedDockerVolume (16.38s) --- PASS: TestAccAWSInspectorResourceGroup_basic (22.88s) --- PASS: TestAccAWSKinesisAnalyticsApplication_addCloudwatchLoggingOptions (34.01s) --- PASS: TestAccAWSKinesisAnalyticsApplication_basic (18.73s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsAdd (75.84s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsKinesisFirehose (103.79s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsKinesisStream (63.12s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsUpdateKinesisStream (120.00s) --- PASS: TestAccAWSKinesisAnalyticsApplication_Outputs_Lambda_Add (50.36s) --- PASS: TestAccAWSKinesisAnalyticsApplication_Outputs_Lambda_Create (39.75s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsAdd (75.76s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsKinesisStream (62.71s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsMultiple (66.35s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsUpdateKinesisStream (123.03s) --- PASS: TestAccAWSKinesisAnalyticsApplication_referenceDataSource (38.35s) --- PASS: TestAccAWSKinesisAnalyticsApplication_referenceDataSourceUpdate (69.86s) --- PASS: TestAccAWSKinesisAnalyticsApplication_tags (49.91s) --- PASS: TestAccAWSKinesisAnalyticsApplication_update (28.74s) --- PASS: TestAccAWSKinesisAnalyticsApplication_updateCloudwatchLoggingOptions (46.64s) --- PASS: TestAccAWSKinesisVideoStream_disappears (95.02s) --- PASS: TestAccAWSLambdaFunction_DeadLetterConfigUpdated (76.72s) --- PASS: TestAccAWSLambdaPermission_disappears (100.98s) --- PASS: TestAccAWSLightsailKeyPair_publicKey (29.88s) --- PASS: TestAccAWSMainRouteTableAssociation_basic (69.00s) ```
* provider: First batch of unparam linter fixes Reference: #13278 Previously: ``` aws/resource_aws_api_gateway_base_path_mapping_test.go:124:56: `testAccCheckAWSAPIGatewayBasePathExists` - `name` is unused (unparam) func testAccCheckAWSAPIGatewayBasePathExists(n string, name string, res *apigateway.BasePathMapping) resource.TestCheckFunc { ^ aws/resource_aws_athena_database.go:67:126: expandAthenaResultConfiguration - result 1 (error) is always nil (unparam) func expandAthenaResultConfiguration(bucket string, encryptionConfigurationList []interface{}) (*athena.ResultConfiguration, error) { ^ aws/resource_aws_cloudtrail_test.go:552:67: `testAccCheckCloudTrailLoggingEnabled` - `trail` is unused (unparam) func testAccCheckCloudTrailLoggingEnabled(n string, desired bool, trail *cloudtrail.Trail) resource.TestCheckFunc { ^ aws/resource_aws_ecs_cluster_test.go:494:58: `testAccAWSEcsClusterCapacityProvidersFargate` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargate(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:510:62: `testAccAWSEcsClusterCapacityProvidersFargateSpot` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateSpot(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:526:62: `testAccAWSEcsClusterCapacityProvidersFargateBoth` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateBoth(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:542:68: `testAccAWSEcsClusterCapacityProvidersFargateNoStrategy` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateNoStrategy(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:552:72: `testAccAWSEcsClusterCapacityProvidersFargateSpotNoStrategy` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateSpotNoStrategy(rName, providerName string) string { ^ aws/resource_aws_ecs_task_definition.go:611:93: expandEcsInferenceAccelerators - result 1 (error) is always nil (unparam) func expandEcsInferenceAccelerators(configured []interface{}) ([]*ecs.InferenceAccelerator, error) { ^ aws/resource_aws_eip_association_test.go:233:61: `testAccCheckAWSEIPAssociationHasIpBasedId` - `res` is unused (unparam) func testAccCheckAWSEIPAssociationHasIpBasedId(name string, res *ec2.Address) resource.TestCheckFunc { ^ aws/resource_aws_inspector_resource_group_test.go:72:53: `testAccCheckAWSInspectorResourceGroupRecreated` - `t` is unused (unparam) func testAccCheckAWSInspectorResourceGroupRecreated(t *testing.T, v1, v2 *inspector.ResourceGroup) resource.TestCheckFunc { ^ aws/resource_aws_instance_migrate.go:79:56: writeV1BlockDevice - result 0 (error) is always nil (unparam) is *terraform.InstanceState, oldBd map[string]string) error { ^ aws/resource_aws_kinesis_analytics_application.go:1088:96: createApplicationUpdateOpts - result 1 (error) is always nil (unparam) func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { ^ aws/resource_aws_kinesis_video_stream_test.go:167:68: `testAccCheckKinesisVideoStreamDisappears` - `stream` is unused (unparam) func testAccCheckKinesisVideoStreamDisappears(resourceName string, stream *kinesisvideo.StreamInfo) resource.TestCheckFunc { ^ aws/resource_aws_lambda_function_test.go:2375:56: `testAccAWSLambdaConfigWithDeadLetterConfigUpdated` - `funcName` is unused (unparam) func testAccAWSLambdaConfigWithDeadLetterConfigUpdated(funcName, topic1Name, topic2Name, policyName, ^ aws/resource_aws_lambda_permission_test.go:544:53: `testAccAWSLambdaPermissionDisappears` - `statement` is unused (unparam) func testAccAWSLambdaPermissionDisappears(n string, statement *LambdaPolicyStatement) resource.TestCheckFunc { ^ aws/resource_aws_lightsail_key_pair_test.go:178:63: `testAccAWSLightsailKeyPairConfig_imported` - `key` is unused (unparam) func testAccAWSLightsailKeyPairConfig_imported(lightsailName, key string) string { ^ aws/resource_aws_main_route_table_association_test.go:73:2: `testAccCheckMainRouteTableAssociation` - `routeTableResource` is unused (unparam) routeTableResource string) resource.TestCheckFunc { ^ ``` Output from acceptance testing: ``` (TestAccAWSAPIGatewayBasePathMapping_|TestAccAWSAthenaDatabase_|TestAccAWSCloudTrail/Trail/enableLogging|TestAccAWSEcsCluster_CapacityProviders|TestAccAWSEcsTaskDefinition_|TestAccAWSInspectorResourceGroup_basic|TestAccAWSKinesisAnalyticsApplication_|TestAccAWSKinesisVideoStream_disappears|TestAccAWSLambdaFunction_DeadLetterConfigUpdated|TestAccAWSLambdaPermission_disappears|TestAccAWSLightsailKeyPair_publicKey|TestAccAWSMainRouteTableAssociation_basic) --- PASS: TestAccAWSAPIGatewayBasePathMapping_BasePath_Empty (54.58s) --- PASS: TestAccAWSAPIGatewayBasePathMapping_basic (55.48s) --- PASS: TestAccAWSAthenaDatabase_basic (60.51s) --- PASS: TestAccAWSAthenaDatabase_destroyFailsIfTablesExist (73.58s) --- PASS: TestAccAWSAthenaDatabase_encryption (71.05s) --- PASS: TestAccAWSAthenaDatabase_forceDestroyAlwaysSucceeds (65.41s) --- PASS: TestAccAWSAthenaDatabase_nameCantHaveUppercase (1.46s) --- PASS: TestAccAWSAthenaDatabase_nameStartsWithUnderscore (61.23s) --- PASS: TestAccAWSCloudTrail/Trail/enableLogging (105.77s) --- PASS: TestAccAWSEcsCluster_CapacityProviders (48.45s) --- PASS: TestAccAWSEcsCluster_CapacityProvidersNoStrategy (53.69s) --- PASS: TestAccAWSEcsCluster_CapacityProvidersUpdate (81.22s) --- PASS: TestAccAWSEcsTaskDefinition_arrays (16.36s) --- PASS: TestAccAWSEcsTaskDefinition_basic (26.60s) --- PASS: TestAccAWSEcsTaskDefinition_changeVolumesForcesNewResource (26.89s) --- PASS: TestAccAWSEcsTaskDefinition_constraint (16.28s) --- PASS: TestAccAWSEcsTaskDefinition_ExecutionRole (16.69s) --- PASS: TestAccAWSEcsTaskDefinition_Fargate (21.81s) --- PASS: TestAccAWSEcsTaskDefinition_Inactive (25.92s) --- PASS: TestAccAWSEcsTaskDefinition_inferenceAccelerator (14.07s) --- PASS: TestAccAWSEcsTaskDefinition_ProxyConfiguration (26.41s) --- PASS: TestAccAWSEcsTaskDefinition_Tags (45.91s) --- PASS: TestAccAWSEcsTaskDefinition_withDockerVolume (16.00s) --- PASS: TestAccAWSEcsTaskDefinition_withDockerVolumeMinimalConfig (16.27s) --- PASS: TestAccAWSEcsTaskDefinition_withEcsService (91.23s) --- PASS: TestAccAWSEcsTaskDefinition_withEFSVolume (27.55s) --- PASS: TestAccAWSEcsTaskDefinition_withEFSVolumeMinimal (27.70s) --- PASS: TestAccAWSEcsTaskDefinition_withIPCMode (16.69s) --- PASS: TestAccAWSEcsTaskDefinition_withNetworkMode (16.85s) --- PASS: TestAccAWSEcsTaskDefinition_withPidMode (18.24s) --- PASS: TestAccAWSEcsTaskDefinition_withScratchVolume (15.69s) --- PASS: TestAccAWSEcsTaskDefinition_withTaskRoleArn (16.75s) --- PASS: TestAccAWSEcsTaskDefinition_withTaskScopedDockerVolume (16.38s) --- PASS: TestAccAWSInspectorResourceGroup_basic (22.88s) --- PASS: TestAccAWSKinesisAnalyticsApplication_addCloudwatchLoggingOptions (34.01s) --- PASS: TestAccAWSKinesisAnalyticsApplication_basic (18.73s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsAdd (75.84s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsKinesisFirehose (103.79s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsKinesisStream (63.12s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsUpdateKinesisStream (120.00s) --- PASS: TestAccAWSKinesisAnalyticsApplication_Outputs_Lambda_Add (50.36s) --- PASS: TestAccAWSKinesisAnalyticsApplication_Outputs_Lambda_Create (39.75s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsAdd (75.76s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsKinesisStream (62.71s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsMultiple (66.35s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsUpdateKinesisStream (123.03s) --- PASS: TestAccAWSKinesisAnalyticsApplication_referenceDataSource (38.35s) --- PASS: TestAccAWSKinesisAnalyticsApplication_referenceDataSourceUpdate (69.86s) --- PASS: TestAccAWSKinesisAnalyticsApplication_tags (49.91s) --- PASS: TestAccAWSKinesisAnalyticsApplication_update (28.74s) --- PASS: TestAccAWSKinesisAnalyticsApplication_updateCloudwatchLoggingOptions (46.64s) --- PASS: TestAccAWSKinesisVideoStream_disappears (95.02s) --- PASS: TestAccAWSLambdaFunction_DeadLetterConfigUpdated (76.72s) --- PASS: TestAccAWSLambdaPermission_disappears (100.98s) --- PASS: TestAccAWSLightsailKeyPair_publicKey (29.88s) --- PASS: TestAccAWSMainRouteTableAssociation_basic (69.00s) ``` * resource/aws_instance: Remove redundant return Previously: ``` aws/resource_aws_instance_migrate.go:108:2: S1023: redundant `return` statement (gosimple) return ^ ```
* provider: First batch of unparam linter fixes Reference: hashicorp#13278 Previously: ``` aws/resource_aws_api_gateway_base_path_mapping_test.go:124:56: `testAccCheckAWSAPIGatewayBasePathExists` - `name` is unused (unparam) func testAccCheckAWSAPIGatewayBasePathExists(n string, name string, res *apigateway.BasePathMapping) resource.TestCheckFunc { ^ aws/resource_aws_athena_database.go:67:126: expandAthenaResultConfiguration - result 1 (error) is always nil (unparam) func expandAthenaResultConfiguration(bucket string, encryptionConfigurationList []interface{}) (*athena.ResultConfiguration, error) { ^ aws/resource_aws_cloudtrail_test.go:552:67: `testAccCheckCloudTrailLoggingEnabled` - `trail` is unused (unparam) func testAccCheckCloudTrailLoggingEnabled(n string, desired bool, trail *cloudtrail.Trail) resource.TestCheckFunc { ^ aws/resource_aws_ecs_cluster_test.go:494:58: `testAccAWSEcsClusterCapacityProvidersFargate` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargate(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:510:62: `testAccAWSEcsClusterCapacityProvidersFargateSpot` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateSpot(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:526:62: `testAccAWSEcsClusterCapacityProvidersFargateBoth` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateBoth(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:542:68: `testAccAWSEcsClusterCapacityProvidersFargateNoStrategy` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateNoStrategy(rName, providerName string) string { ^ aws/resource_aws_ecs_cluster_test.go:552:72: `testAccAWSEcsClusterCapacityProvidersFargateSpotNoStrategy` - `providerName` is unused (unparam) func testAccAWSEcsClusterCapacityProvidersFargateSpotNoStrategy(rName, providerName string) string { ^ aws/resource_aws_ecs_task_definition.go:611:93: expandEcsInferenceAccelerators - result 1 (error) is always nil (unparam) func expandEcsInferenceAccelerators(configured []interface{}) ([]*ecs.InferenceAccelerator, error) { ^ aws/resource_aws_eip_association_test.go:233:61: `testAccCheckAWSEIPAssociationHasIpBasedId` - `res` is unused (unparam) func testAccCheckAWSEIPAssociationHasIpBasedId(name string, res *ec2.Address) resource.TestCheckFunc { ^ aws/resource_aws_inspector_resource_group_test.go:72:53: `testAccCheckAWSInspectorResourceGroupRecreated` - `t` is unused (unparam) func testAccCheckAWSInspectorResourceGroupRecreated(t *testing.T, v1, v2 *inspector.ResourceGroup) resource.TestCheckFunc { ^ aws/resource_aws_instance_migrate.go:79:56: writeV1BlockDevice - result 0 (error) is always nil (unparam) is *terraform.InstanceState, oldBd map[string]string) error { ^ aws/resource_aws_kinesis_analytics_application.go:1088:96: createApplicationUpdateOpts - result 1 (error) is always nil (unparam) func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { ^ aws/resource_aws_kinesis_video_stream_test.go:167:68: `testAccCheckKinesisVideoStreamDisappears` - `stream` is unused (unparam) func testAccCheckKinesisVideoStreamDisappears(resourceName string, stream *kinesisvideo.StreamInfo) resource.TestCheckFunc { ^ aws/resource_aws_lambda_function_test.go:2375:56: `testAccAWSLambdaConfigWithDeadLetterConfigUpdated` - `funcName` is unused (unparam) func testAccAWSLambdaConfigWithDeadLetterConfigUpdated(funcName, topic1Name, topic2Name, policyName, ^ aws/resource_aws_lambda_permission_test.go:544:53: `testAccAWSLambdaPermissionDisappears` - `statement` is unused (unparam) func testAccAWSLambdaPermissionDisappears(n string, statement *LambdaPolicyStatement) resource.TestCheckFunc { ^ aws/resource_aws_lightsail_key_pair_test.go:178:63: `testAccAWSLightsailKeyPairConfig_imported` - `key` is unused (unparam) func testAccAWSLightsailKeyPairConfig_imported(lightsailName, key string) string { ^ aws/resource_aws_main_route_table_association_test.go:73:2: `testAccCheckMainRouteTableAssociation` - `routeTableResource` is unused (unparam) routeTableResource string) resource.TestCheckFunc { ^ ``` Output from acceptance testing: ``` (TestAccAWSAPIGatewayBasePathMapping_|TestAccAWSAthenaDatabase_|TestAccAWSCloudTrail/Trail/enableLogging|TestAccAWSEcsCluster_CapacityProviders|TestAccAWSEcsTaskDefinition_|TestAccAWSInspectorResourceGroup_basic|TestAccAWSKinesisAnalyticsApplication_|TestAccAWSKinesisVideoStream_disappears|TestAccAWSLambdaFunction_DeadLetterConfigUpdated|TestAccAWSLambdaPermission_disappears|TestAccAWSLightsailKeyPair_publicKey|TestAccAWSMainRouteTableAssociation_basic) --- PASS: TestAccAWSAPIGatewayBasePathMapping_BasePath_Empty (54.58s) --- PASS: TestAccAWSAPIGatewayBasePathMapping_basic (55.48s) --- PASS: TestAccAWSAthenaDatabase_basic (60.51s) --- PASS: TestAccAWSAthenaDatabase_destroyFailsIfTablesExist (73.58s) --- PASS: TestAccAWSAthenaDatabase_encryption (71.05s) --- PASS: TestAccAWSAthenaDatabase_forceDestroyAlwaysSucceeds (65.41s) --- PASS: TestAccAWSAthenaDatabase_nameCantHaveUppercase (1.46s) --- PASS: TestAccAWSAthenaDatabase_nameStartsWithUnderscore (61.23s) --- PASS: TestAccAWSCloudTrail/Trail/enableLogging (105.77s) --- PASS: TestAccAWSEcsCluster_CapacityProviders (48.45s) --- PASS: TestAccAWSEcsCluster_CapacityProvidersNoStrategy (53.69s) --- PASS: TestAccAWSEcsCluster_CapacityProvidersUpdate (81.22s) --- PASS: TestAccAWSEcsTaskDefinition_arrays (16.36s) --- PASS: TestAccAWSEcsTaskDefinition_basic (26.60s) --- PASS: TestAccAWSEcsTaskDefinition_changeVolumesForcesNewResource (26.89s) --- PASS: TestAccAWSEcsTaskDefinition_constraint (16.28s) --- PASS: TestAccAWSEcsTaskDefinition_ExecutionRole (16.69s) --- PASS: TestAccAWSEcsTaskDefinition_Fargate (21.81s) --- PASS: TestAccAWSEcsTaskDefinition_Inactive (25.92s) --- PASS: TestAccAWSEcsTaskDefinition_inferenceAccelerator (14.07s) --- PASS: TestAccAWSEcsTaskDefinition_ProxyConfiguration (26.41s) --- PASS: TestAccAWSEcsTaskDefinition_Tags (45.91s) --- PASS: TestAccAWSEcsTaskDefinition_withDockerVolume (16.00s) --- PASS: TestAccAWSEcsTaskDefinition_withDockerVolumeMinimalConfig (16.27s) --- PASS: TestAccAWSEcsTaskDefinition_withEcsService (91.23s) --- PASS: TestAccAWSEcsTaskDefinition_withEFSVolume (27.55s) --- PASS: TestAccAWSEcsTaskDefinition_withEFSVolumeMinimal (27.70s) --- PASS: TestAccAWSEcsTaskDefinition_withIPCMode (16.69s) --- PASS: TestAccAWSEcsTaskDefinition_withNetworkMode (16.85s) --- PASS: TestAccAWSEcsTaskDefinition_withPidMode (18.24s) --- PASS: TestAccAWSEcsTaskDefinition_withScratchVolume (15.69s) --- PASS: TestAccAWSEcsTaskDefinition_withTaskRoleArn (16.75s) --- PASS: TestAccAWSEcsTaskDefinition_withTaskScopedDockerVolume (16.38s) --- PASS: TestAccAWSInspectorResourceGroup_basic (22.88s) --- PASS: TestAccAWSKinesisAnalyticsApplication_addCloudwatchLoggingOptions (34.01s) --- PASS: TestAccAWSKinesisAnalyticsApplication_basic (18.73s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsAdd (75.84s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsKinesisFirehose (103.79s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsKinesisStream (63.12s) --- PASS: TestAccAWSKinesisAnalyticsApplication_inputsUpdateKinesisStream (120.00s) --- PASS: TestAccAWSKinesisAnalyticsApplication_Outputs_Lambda_Add (50.36s) --- PASS: TestAccAWSKinesisAnalyticsApplication_Outputs_Lambda_Create (39.75s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsAdd (75.76s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsKinesisStream (62.71s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsMultiple (66.35s) --- PASS: TestAccAWSKinesisAnalyticsApplication_outputsUpdateKinesisStream (123.03s) --- PASS: TestAccAWSKinesisAnalyticsApplication_referenceDataSource (38.35s) --- PASS: TestAccAWSKinesisAnalyticsApplication_referenceDataSourceUpdate (69.86s) --- PASS: TestAccAWSKinesisAnalyticsApplication_tags (49.91s) --- PASS: TestAccAWSKinesisAnalyticsApplication_update (28.74s) --- PASS: TestAccAWSKinesisAnalyticsApplication_updateCloudwatchLoggingOptions (46.64s) --- PASS: TestAccAWSKinesisVideoStream_disappears (95.02s) --- PASS: TestAccAWSLambdaFunction_DeadLetterConfigUpdated (76.72s) --- PASS: TestAccAWSLambdaPermission_disappears (100.98s) --- PASS: TestAccAWSLightsailKeyPair_publicKey (29.88s) --- PASS: TestAccAWSMainRouteTableAssociation_basic (69.00s) ``` * resource/aws_instance: Remove redundant return Previously: ``` aws/resource_aws_instance_migrate.go:108:2: S1023: redundant `return` statement (gosimple) return ^ ```
This has been released in version 2.67.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! |
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! |
Community Note
Description
The
unparam
linter was originally enabled back in thegometalinter
days, but it was not migrated during the switchover togolangci-lint
. For historical context: we migrated in a hurry due to CI timeout issues, so not sure if it was due to performance, it not existing in the tool, or just an omission. This linter is great for catching coding errors and we should re-enable it!For now, we should ignore
always receives
reports, which are noisy with some of our development practices.Affected Resource(s)
To see the reports:
Definition of Done
.golangci.yml
:unparam
reports fixedunparam
linter added in.golangci.yml
References
The text was updated successfully, but these errors were encountered: