Skip to content

Commit

Permalink
build(ci): update golang config (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfalkowski authored Dec 12, 2024
1 parent bc915dd commit 0ee120a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 59 deletions.
74 changes: 16 additions & 58 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,18 @@
linters:
disable-all: true
enable:
- asciicheck
- bidichk
- cyclop
- decorder
- dogsled
- dupl
- durationcheck
- errchkjson
- errname
- errorlint
enable-all: true
disable:
- exportloopref
- exhaustive
- funlen
- gci
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- gofmt
- gofumpt
- goheader
- goimports
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- grouper
- importas
- lll
- maintidx
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
- prealloc
- predeclared
- promlinter
- revive
- rowserrcheck
- sqlclosecheck
- stylecheck
- tenv
- testpackage
- thelper
- tparallel
- unconvert
- unparam
- wastedassign
- whitespace
- wsl
- tagalign
- gochecknoinits
- bodyclose
- depguard
- exhaustruct
- fatcontext
- forcetypeassert
- gochecknoglobals
- ireturn
- mnd
- paralleltest
- varnamelen
- wrapcheck
- tagliatelle
2 changes: 1 addition & 1 deletion checker/http_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type HTTPChecker struct {

// Check the URL with a GET.
func (c *HTTPChecker) Check(ctx context.Context) error {
req, err := http.NewRequestWithContext(ctx, "GET", c.url, http.NoBody)
req, err := http.NewRequestWithContext(ctx, http.MethodGet, c.url, http.NoBody)
if err != nil {
return fmt.Errorf("http checker: %w", err)
}
Expand Down
1 change: 1 addition & 0 deletions server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ func TestValidDBChecker(t *testing.T) {
})
}

//nolint:err113
func TestValidReadyChecker(t *testing.T) {
Convey("Given we have a new server", t, func() {
s := server.NewServer()
Expand Down

0 comments on commit 0ee120a

Please sign in to comment.