Skip to content

Commit

Permalink
Tidy up linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdee committed Sep 25, 2024
1 parent b30a1ff commit e54c7ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
12 changes: 5 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ output:

# All available settings of specific linters.
linters-settings:
gosec:
excludes:
- G115 # This generates a lot of false positives, recheck once https://github.com/securego/gosec/issues/1212 is closed

lll:
line-length: 132

Expand Down Expand Up @@ -162,20 +166,14 @@ linters:
- execinquery
- exhaustive
- exhaustruct
- forcetypeassert
- exportloopref
- funlen
- gci
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- err113
- gomnd
- ireturn
- lll
- maintidx
- mnd
- musttag
- perfsprint
- varnamelen
- wrapcheck
Expand Down
1 change: 0 additions & 1 deletion http/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func decodeJSONResponse[T any](body io.Reader, res T) (T, map[string]any, error)
return res, nil, errors.Join(errors.New("failed to parse JSON"), err)
}

//nolint:forcetypeassert
data, isCorrectType := clone.Clone(res).(T)
if !isCorrectType {
return res, nil, ErrIncorrectType
Expand Down

0 comments on commit e54c7ff

Please sign in to comment.