Skip to content

Commit

Permalink
Add golangci-lint config (.golangci.yml)
Browse files Browse the repository at this point in the history
This makes it possible to run the linter with just `golangci-lint run`.
Disable gosec linter in one place in auth_test.go
  • Loading branch information
ryboe authored and Ryan Boehning committed Jun 3, 2019
1 parent e3fb96e commit bc5dacc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
run:
deadline: 1m
modules-download-mode: vendor
tests: true

linters:
enable-all: true
disable:
- lll

linters-settings:
gocyclo:
min-complexity: 12
gofmt:
simplify: true
10 changes: 6 additions & 4 deletions pkg/auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ import (
"github.com/stretchr/testify/mock"
)

const testToken = "s.iyNUhq8Ov4hIAx6snw5mB2nL"
const testTokenLookupPayload = `
// nolint: gosec
const (
testToken = "s.iyNUhq8Ov4hIAx6snw5mB2nL"
testTokenLookupPayload = `
{
"data": {
"accessor": "8609694a-cdbc-db9b-d345-e782dbb562ed",
Expand Down Expand Up @@ -61,8 +63,7 @@ const testTokenLookupPayload = `
}
}
`

const testAuthResponse = `
testAuthResponse = `
{
"auth": {
"client_token": "b.AAAAAQL_tyer_gNuQqvQYPVQgsNxjap_YW1NB2m4CDHHadQo7rF2XLFGdw-NJplAZNKbfloOvifrbpRCGdgG1taTqmC7D-a_qftN64zeL10SmNwEoDTiPzC_1aS1KExbtVftU3Sx16cBVqaynwsYRDfVnfTAffE",
Expand All @@ -83,6 +84,7 @@ const testAuthResponse = `
}
}
`
)

func TestAuthPanic(t *testing.T) {
var config cfg.Config
Expand Down

0 comments on commit bc5dacc

Please sign in to comment.