Skip to content

Commit 67b0fe6

Browse files
build(deps): bump golangci/golangci-lint-action from 6.5.2 to 7.0.0 (#155)
* build(deps): bump golangci/golangci-lint-action from 6.5.2 to 7.0.0 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.5.2 to 7.0.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@55c2c14...1481404) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: migrate golangci-lint --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ignacio Anaya <[email protected]>
1 parent ab0ca0d commit 67b0fe6

File tree

5 files changed

+64
-18
lines changed

5 files changed

+64
-18
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- run: go mod download
2525
- run: go build -v .
2626
- name: Run linters
27-
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
27+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
2828
with:
2929
version: latest
3030

.golangci.bck.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Visit https://golangci-lint.run/ for usage documentation
2+
# and information on other useful linters
3+
issues:
4+
max-same-issues: 0
5+
6+
linters:
7+
disable-all: true
8+
enable:
9+
- durationcheck
10+
- errcheck
11+
- copyloopvar
12+
- forcetypeassert
13+
- godot
14+
- gofmt
15+
- gosimple
16+
- ineffassign
17+
- makezero
18+
- misspell
19+
- nilerr
20+
- predeclared
21+
- staticcheck
22+
- usetesting
23+
- unconvert
24+
- unparam
25+
- unused
26+
- govet

.golangci.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
1-
# Visit https://golangci-lint.run/ for usage documentation
2-
# and information on other useful linters
3-
issues:
4-
max-same-issues: 0
5-
1+
version: "2"
62
linters:
7-
disable-all: true
3+
default: none
84
enable:
5+
- copyloopvar
96
- durationcheck
107
- errcheck
11-
- copyloopvar
128
- forcetypeassert
139
- godot
14-
- gofmt
15-
- gosimple
10+
- govet
1611
- ineffassign
1712
- makezero
1813
- misspell
1914
- nilerr
2015
- predeclared
2116
- staticcheck
22-
- usetesting
2317
- unconvert
2418
- unparam
2519
- unused
26-
- govet
20+
- usetesting
21+
exclusions:
22+
generated: lax
23+
presets:
24+
- comments
25+
- common-false-positives
26+
- legacy
27+
- std-error-handling
28+
paths:
29+
- third_party$
30+
- builtin$
31+
- examples$
32+
issues:
33+
max-same-issues: 0
34+
formatters:
35+
enable:
36+
- gofmt
37+
exclusions:
38+
generated: lax
39+
paths:
40+
- third_party$
41+
- builtin$
42+
- examples$

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ fmt:
103103
go fmt ./...
104104
terraform fmt -recursive
105105

106+
.PHONY: lint
107+
lint:
108+
golangci-lint run
109+
106110
.PHONY: help
107111
help:
108112
@echo "Available commands:"
@@ -117,3 +121,4 @@ help:
117121
@echo "testacc - Run acceptance tests. These are integration tests that use the Terraform binary to test real infrastructure."
118122
@echo "sync - Fetch and update the current version in the 'example' directory. This syncs the version used in examples with the latest git tag."
119123
@echo "tool - Run Go tools. This is a placeholder for any Go-based tools you might want to run as part of the build."
124+

internal/provider/env/aws/model.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55

66
common "github.com/altinity/terraform-provider-altinitycloud/internal/provider/env/common"
7-
"github.com/altinity/terraform-provider-altinitycloud/internal/sdk/client"
87
sdk "github.com/altinity/terraform-provider-altinitycloud/internal/sdk/client"
98
"github.com/hashicorp/terraform-plugin-framework/types"
109
)
@@ -120,7 +119,7 @@ func (e AWSEnvResourceModel) toSDK() (sdk.CreateAWSEnvInput, sdk.UpdateAWSEnvInp
120119
},
121120
}
122121

123-
strategy := client.UpdateStrategyReplace
122+
strategy := sdk.UpdateStrategyReplace
124123
update := sdk.UpdateAWSEnvInput{
125124
Name: e.Name.ValueString(),
126125
UpdateStrategy: &strategy,
@@ -260,7 +259,7 @@ func loadBalancersToModel(loadBalancers sdk.AWSEnvSpecFragment_LoadBalancers) *L
260259
func nodeGroupsToSDK(nodeGroups []common.NodeGroupsModel) []*sdk.AWSEnvNodeGroupSpecInput {
261260
var sdkNodeGroups []*sdk.AWSEnvNodeGroupSpecInput
262261
for _, np := range nodeGroups {
263-
var reservations []client.NodeReservation
262+
var reservations []sdk.NodeReservation
264263
np.Reservations.ElementsAs(context.TODO(), &reservations, false)
265264

266265
var zones []string
@@ -313,11 +312,11 @@ func maintenanceWindowsToModel(input []*sdk.AWSEnvSpecFragment_MaintenanceWindow
313312
return maintenanceWindow
314313
}
315314

316-
func reorderNodeGroups(model []common.NodeGroupsModel, sdk []*client.AWSEnvSpecFragment_NodeGroups) []*client.AWSEnvSpecFragment_NodeGroups {
317-
orderedNodeGroups := make([]*client.AWSEnvSpecFragment_NodeGroups, 0, len(sdk))
315+
func reorderNodeGroups(model []common.NodeGroupsModel, nodeGroups []*sdk.AWSEnvSpecFragment_NodeGroups) []*sdk.AWSEnvSpecFragment_NodeGroups {
316+
orderedNodeGroups := make([]*sdk.AWSEnvSpecFragment_NodeGroups, 0, len(nodeGroups))
318317

319318
for _, ng := range model {
320-
for _, apiGroup := range sdk {
319+
for _, apiGroup := range nodeGroups {
321320
if ng.NodeType.ValueString() == apiGroup.NodeType {
322321
orderedNodeGroups = append(orderedNodeGroups, apiGroup)
323322
break

0 commit comments

Comments
 (0)