Skip to content

Commit

Permalink
chore: fix go lint
Browse files Browse the repository at this point in the history
Signed-off-by: Manfred Touron <[email protected]>
  • Loading branch information
moul committed Jul 23, 2022
1 parent e32fad4 commit 7f11727
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
9 changes: 4 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ run:
- ".*\\.gen\\.go"

linters-settings:
golint:
min-confidence: 0
maligned:
suggest-new: true
goconst:
Expand Down Expand Up @@ -40,22 +38,23 @@ linters:
- gofmt
- gofumpt
- goimports
- golint
#- golint
- gomnd
- gomodguard
- gosec
- gosimple
- govet
- ineffassign
- interfacer
#- interfacer
#- maligned
- misspell
- nakedret
- nestif
- noctx
- nolintlint
- prealloc
- scopelint
- revive
- exportloopref
- sqlclosecheck
- staticcheck
- structcheck
Expand Down
3 changes: 2 additions & 1 deletion internal/dvserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ func New(ctx context.Context, h *cayley.Handle, schema *schema.Config, opts Opts
}
svc.httpListenerAddr = listener.Addr().String()
srv := http.Server{
Handler: r,
ReadHeaderTimeout: 2 * time.Second, // nolint:gomnd
Handler: r,
}
svc.workers.Add(func() error {
httpLogger.Debug("starting HTTP server", zap.String("bind", opts.HTTPBind))
Expand Down
4 changes: 2 additions & 2 deletions internal/githubprovider/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func fromIssue(batch *dvmodel.Batch, input *github.Issue) error {

// assignees
for _, assignee := range input.Assignees {
assigneeRet, err := fromUser(batch, assignee) // nolint:typecheck // false-positive?
assigneeRet, err := fromUser(batch, assignee)
if err != nil {
return fmt.Errorf("from user: %w", err)
}
Expand All @@ -106,7 +106,7 @@ func fromIssue(batch *dvmodel.Batch, input *github.Issue) error {

// labels
for _, label := range input.Labels {
labelRet, err := fromLabel(batch, label) // nolint:typecheck // false-positive?
labelRet, err := fromLabel(batch, label)
if err != nil {
return fmt.Errorf("from label: %w", err)
}
Expand Down

0 comments on commit 7f11727

Please sign in to comment.