Skip to content

Feature/upgrade to golangci lint v2#1443

Open
Manuelvaas wants to merge 4 commits intomainfrom
feature/upgrade-to-golangci-lint-v2
Open

Feature/upgrade to golangci lint v2#1443
Manuelvaas wants to merge 4 commits intomainfrom
feature/upgrade-to-golangci-lint-v2

Conversation

@Manuelvaas
Copy link
Copy Markdown
Contributor

Description

relates to #1277 and STACKITTPR-253

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@Manuelvaas Manuelvaas requested a review from a team as a code owner May 4, 2026 16:12
@Manuelvaas Manuelvaas enabled auto-merge (squash) May 4, 2026 16:21
Comment thread golang-ci.yaml Outdated
Comment thread stackit/internal/services/iaas/iaas_acc_test.go
Comment on lines -3214 to -3227
resource.TestCheckResourceAttrPair(
"stackit_security_group_rule.security_group_rule", "project_id",
"stackit_security_group.security_group", "project_id",
),
resource.TestCheckResourceAttrPair(
"stackit_security_group_rule.security_group_rule", "security_group_id",
"stackit_security_group.security_group", "security_group_id",
),
resource.TestCheckResourceAttrPair(
"stackit_security_group_rule.security_group_rule_remote_security_group", "remote_security_group_id",
"stackit_security_group.security_group_remote", "security_group_id",
),
resource.TestCheckResourceAttrSet("stackit_security_group_rule.security_group_rule", "security_group_rule_id"),
resource.TestCheckResourceAttr("stackit_security_group_rule.security_group_rule", "direction", testutil.ConvertConfigVariable(testConfigSecurityGroupsVarsMax["direction"])),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think here was just a copy paste issue, because these checks should check the remote security group regarding the comment. So instead of removing the checks, they should be adjusted.

replace "stackit_security_group_rule.security_group_rule" with "stackit_security_group_rule.security_group_rule_remote_security_group" in these checks

Comment on lines 3369 to 3370
),
resource.TestCheckResourceAttrSet("data.stackit_security_group_rule.security_group_rule", "security_group_rule_id"),
resource.TestCheckResourceAttr("data.stackit_security_group_rule.security_group_rule", "direction", testutil.ConvertConfigVariable(testConfigSecurityGroupsVarsMax["direction"])),
),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here, looks just like a copy paste issue and the wrong data source is here referenced

Comment on lines -3486 to -3499
resource.TestCheckResourceAttrPair(
"stackit_security_group_rule.security_group_rule", "project_id",
"stackit_security_group.security_group", "project_id",
),
resource.TestCheckResourceAttrPair(
"stackit_security_group_rule.security_group_rule", "security_group_id",
"stackit_security_group.security_group", "security_group_id",
),
resource.TestCheckResourceAttrPair(
"stackit_security_group_rule.security_group_rule_remote_security_group", "remote_security_group_id",
"stackit_security_group.security_group_remote", "security_group_id",
),
resource.TestCheckResourceAttrSet("stackit_security_group_rule.security_group_rule", "security_group_rule_id"),
resource.TestCheckResourceAttr("stackit_security_group_rule.security_group_rule", "direction", testutil.ConvertConfigVariable(testConfigSecurityGroupsVarsMaxUpdated()["direction"])),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

Comment thread stackit/internal/services/iaas/image/resource.go
Co-authored-by: Marcel Jacek <72880145+marceljk@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/terraform-provider-stackit/stackit 1.26% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/access_token 21.43% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/cdn/distribution 55.00% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/dns 0.00% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/iaas 0.00% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/iaas/image 36.75% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/logme/credential 10.65% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/logs 0.00% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/mariadb/credential 15.47% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/objectstorage/credential 21.78% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/opensearch/credential 15.25% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/rabbitmq/credential 22.49% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/redis/credential 15.22% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/scf 0.00% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverupdate 0.00% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/ske 0.00% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/testutil 39.83% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/cdn/distribution/resource.go 50.70% (ø) 503 255 248
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/iaas/image/resource.go 31.23% (ø) 285 89 196
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/logme/credential/datasource.go 0.00% (ø) 39 0 39
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/logme/credential/resource.go 13.85% (ø) 130 18 112
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/mariadb/credential/datasource.go 0.00% (ø) 39 0 39
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/mariadb/credential/resource.go 19.72% (ø) 142 28 114
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/objectstorage/credential/datasource.go 23.29% (ø) 73 17 56
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/objectstorage/credential/resource.go 21.30% (ø) 230 49 181
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/opensearch/credential/datasource.go 0.00% (ø) 39 0 39
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/opensearch/credential/resource.go 19.57% (ø) 138 27 111
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/rabbitmq/credential/datasource.go 0.00% (ø) 39 0 39
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/rabbitmq/credential/resource.go 27.65% (ø) 170 47 123
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/redis/credential/datasource.go 0.00% (ø) 39 0 39
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/redis/credential/resource.go 19.31% (ø) 145 28 117
github.com/stackitcloud/terraform-provider-stackit/stackit/provider.go 1.26% (ø) 159 2 157

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/access_token/ephemeral_resource_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/dns/dns_acc_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/iaas/iaas_acc_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/logs/logs_acc_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/scf/scf_acc_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/serverupdate/serverupdate_acc_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/ske/ske_acc_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/testutil/testutil_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants