Skip to content

Commit

Permalink
Add .golangci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
olliebun committed May 21, 2023
1 parent 6c7b61c commit 07060a7
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
run:
timeout: 5m

linters:
enable:
- errname
- exhaustive
- exportloopref
- gci
- goconst
- godot
- gofmt
- makezero
- unconvert
- unparam
- whitespace

linters-settings:
exhaustive:
default-signifies-exhaustive: true
goconst:
min-len: 2
min-occurrences: 2
gofmt:
rewrite-rules:
- pattern: interface{}
replacement: any
govet:
enable-all: true
disable:
- fieldalignment
- shadow
makezero:
always: false

issues:
exclude-rules:
- path: _test\.go$
linters:
- goconst
7 changes: 5 additions & 2 deletions flag_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package main

import "testing"
import "github.com/google/go-cmp/cmp"
import (
"testing"

"github.com/google/go-cmp/cmp"
)

func TestRecoveryLevel_Set(t *testing.T) {
assertLevel := func(t *testing.T, want recoveryLevel, s string) {
Expand Down

0 comments on commit 07060a7

Please sign in to comment.