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

Clean up XS003 warnings #11718

Merged
merged 2 commits into from May 16, 2021
Merged

Clean up XS003 warnings #11718

merged 2 commits into from May 16, 2021

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented May 14, 2021

Running the XS003 rule against the master branch and got following warnings:

/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/compute/virtual_machine_scale_set.go:449:17: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/consumption/schema.go:185:13: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/consumption/schema.go:203:13: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/media/media_asset_filter_resource.go:69:31: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/media/media_asset_filter_resource.go:113:23: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/media/media_asset_filter_resource.go:118:20: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/mssql/migration/database_v0_to_v1.go:107:34: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/web/app_service.go:877:16: XS003: schema might introduce crash or diff as it allows to be an empty block

This PR fixes all the warnings above, except the vmss one, which is covered in #11712.

@ghost ghost added size/M and removed size/S labels May 14, 2021
@katbyte katbyte added this to the v2.60.0 milestone May 16, 2021
@katbyte katbyte added the tests label May 16, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @magodo! LGTM 👍

@katbyte katbyte merged commit eb0562c into hashicorp:master May 16, 2021
@ghost
Copy link

ghost commented May 21, 2021

This has been released in version 2.60.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.60.0"
}
# ... other configuration ...

favoretti pushed a commit to gro1m/terraform-provider-azurerm that referenced this pull request May 26, 2021
Running the XS003 rule against the master branch and got following warnings:

/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/compute/virtual_machine_scale_set.go:449:17: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/consumption/schema.go:185:13: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/consumption/schema.go:203:13: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/media/media_asset_filter_resource.go:69:31: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/media/media_asset_filter_resource.go:113:23: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/media/media_asset_filter_resource.go:118:20: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/mssql/migration/database_v0_to_v1.go:107:34: XS003: schema might introduce crash or diff as it allows to be an empty block
/home/magodo/github/terraform-provider-azurerm-secondary/azurerm/internal/services/web/app_service.go:877:16: XS003: schema might introduce crash or diff as it allows to be an empty block
This PR fixes all the warnings above, except the vmss one, which is covered in hashicorp#11712.
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants