Skip to content

Commit 38fe6a3

Browse files
committed
chore: Lints
1 parent 2d6e6fa commit 38fe6a3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.githooks/pre-commit

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ set -ev
44
gofmt -d -e -s .
55
go vet ./...
66
go run github.com/martinlehoux/kagamigo/cmd/cvet ./...
7-
staticcheck ./...
8-
gosec -quiet ./...
9-
gocyclo -over 10 -ignore '.*_templ\.go' .
10-
golangci-lint run
7+
go run honnef.co/go/tools/cmd/staticcheck ./...
8+
go run github.com/securego/gosec/v2/cmd/gosec -quiet ./...
9+
go run github.com/fzipp/gocyclo/cmd/gocyclo -over 10 -ignore '.*_templ\.go' .
10+
go run github.com/golangci/golangci-lint/cmd/golangci-lint run
1111
go test ./...
12-
go mod tidy
12+
go mod tidy

kauth/crypto.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func decrypt(secret []byte, encryptedText string) (string, error) {
4444
if len(encryptedBytes) < nonceSize {
4545
return "", ErrEncryptedTooShort
4646
}
47-
nonce, cipherText := encryptedBytes[:nonceSize], encryptedBytes[nonceSize:]
47+
nonce, cipherText := encryptedBytes[:nonceSize], encryptedBytes[nonceSize:] // #nosec G407
4848
plainBytes, err := aead.Open(nil, nonce, cipherText, nil)
4949
if err != nil {
5050
err = kcore.Wrap(err, "error decrypting")

0 commit comments

Comments
 (0)