Skip to content

Commit 65b5552

Browse files
committed
Updated linters to handle import ordering
1 parent 8e18966 commit 65b5552

File tree

14 files changed

+35
-23
lines changed

14 files changed

+35
-23
lines changed

.golangci.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
version: "2"
2+
formatters:
3+
enable:
4+
- gofmt
5+
- goimports
6+
- gci
7+
settings:
8+
gci:
9+
sections:
10+
- standard
11+
- default
12+
- blank
13+
- dot
14+
- localmodule
15+
custom-order: true
16+
exclusions:
17+
generated: lax
18+
paths:
19+
- third_party$
20+
- builtin$
21+
- examples$
222
linters:
323
default: none
424
enable:
@@ -70,10 +90,3 @@ linters:
7090
- third_party$
7191
- builtin$
7292
- examples$
73-
formatters:
74-
exclusions:
75-
generated: lax
76-
paths:
77-
- third_party$
78-
- builtin$
79-
- examples$

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ GREEN = \033[32m
77
WHITE = \033[37m
88
RESET = \033[0m
99

10-
GOLANG_CI_LINT_VERSION=2.2.2
10+
GOLANG_CI_LINT_VERSION=2.4.0
1111
GO_BIN=$(shell pwd)/.build
1212
export
1313

store/awsrds/store.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
"github.com/aws/aws-sdk-go-v2/aws"
1111
"github.com/aws/aws-sdk-go-v2/feature/rds/auth"
12-
1312
"github.com/davepgreene/go-db-credential-refresh/driver"
1413
"github.com/davepgreene/go-db-credential-refresh/store"
1514
)

store/vault/credentials/agent_database.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import (
44
"context"
55
"os"
66

7-
"github.com/hashicorp/vault-client-go"
8-
97
"github.com/davepgreene/go-db-credential-refresh/store"
8+
"github.com/hashicorp/vault-client-go"
109
)
1110

1211
// Map handles mapping data from a file on disk to a Credentials object. This

store/vault/credentials/api_database.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import (
44
"context"
55
"fmt"
66

7-
"github.com/hashicorp/vault-client-go"
8-
97
"github.com/davepgreene/go-db-credential-refresh/store"
8+
"github.com/hashicorp/vault-client-go"
109
)
1110

1211
// APIDatabaseCredentials gets DB credentials from the Vault Database Secrets engine

store/vault/credentials/api_database_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import (
55
"fmt"
66
"testing"
77

8-
"github.com/davepgreene/go-db-credential-refresh/store/vault/vaulttest"
98
"github.com/hashicorp/vault-client-go/schema"
9+
10+
"github.com/davepgreene/go-db-credential-refresh/store/vault/vaulttest"
1011
)
1112

1213
func TestNewAPIDatabaseCredentials(t *testing.T) {

store/vault/credentials/kv.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import (
44
"context"
55
"encoding/json"
66

7-
"github.com/hashicorp/vault-client-go"
8-
97
"github.com/davepgreene/go-db-credential-refresh/store"
8+
"github.com/hashicorp/vault-client-go"
109
)
1110

1211
// KvCredentials implements the CredentialLocation interface.

store/vault/credentials/kv_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import (
44
"context"
55
"testing"
66

7-
"github.com/davepgreene/go-db-credential-refresh/store/vault/vaulttest"
87
"github.com/hashicorp/vault-client-go"
98
"github.com/hashicorp/vault-client-go/schema"
9+
10+
"github.com/davepgreene/go-db-credential-refresh/store/vault/vaulttest"
1011
)
1112

1213
func TestNewKvCredentials(t *testing.T) {

store/vault/credentials/types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ package vaultcredentials
33
import (
44
"context"
55

6-
"github.com/hashicorp/vault-client-go"
7-
86
"github.com/davepgreene/go-db-credential-refresh/store"
7+
"github.com/hashicorp/vault-client-go"
98
)
109

1110
// CredentialLocation represents a location where credentials can be retrieved from.

store/vault/credentials/utils_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import (
66
"errors"
77
"testing"
88

9-
"github.com/davepgreene/go-db-credential-refresh/store/vault/vaulttest"
109
"github.com/hashicorp/vault-client-go"
1110
"github.com/hashicorp/vault-client-go/schema"
11+
12+
"github.com/davepgreene/go-db-credential-refresh/store/vault/vaulttest"
1213
)
1314

1415
func TestGetFromVaultSecretsAPI(t *testing.T) {

0 commit comments

Comments
 (0)