Skip to content

Commit

Permalink
Fix golangci-lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
r0mdau authored and naveensrinivasan committed Feb 19, 2022
1 parent 53bae3e commit 33f80c9
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 129 deletions.
5 changes: 4 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ linters-settings:
- FIXME
- HACK
gci:
local-prefixes: github.com/ossf/scorecard
sections:
- standard
- default
- prefix(github.com/ossf/scorecard)
gocritic:
enabled-checks:
# Diagnostic
Expand Down
1 change: 0 additions & 1 deletion clients/cii_blob_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"fmt"

"gocloud.dev/blob"

// Needed to link GCP drivers.
_ "gocloud.dev/blob/gcsblob"
)
Expand Down
1 change: 0 additions & 1 deletion cron/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package config

import (

// Used to embed config.yaml.
_ "embed"
"errors"
Expand Down
1 change: 0 additions & 1 deletion cron/data/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"time"

"gocloud.dev/blob"

// Needed to link in GCP drivers.
_ "gocloud.dev/blob/gcsblob"

Expand Down
5 changes: 3 additions & 2 deletions cron/data/metadata.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions cron/data/request.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions cron/format/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ import (
"encoding/json"
"fmt"
"io"

// nolint:gosec
_ "net/http/pprof"
_ "net/http/pprof" // nolint:gosec

docs "github.com/ossf/scorecard/v4/docs/checks"
sce "github.com/ossf/scorecard/v4/errors"
Expand Down
1 change: 0 additions & 1 deletion cron/pubsub/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"sync/atomic"

"gocloud.dev/pubsub"

// Needed to link in GCP drivers.
_ "gocloud.dev/pubsub/gcppubsub"
"google.golang.org/protobuf/encoding/protojson"
Expand Down
1 change: 0 additions & 1 deletion cron/pubsub/subscriber_gocloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"log"

"gocloud.dev/pubsub"

// Needed to link in GCP drivers.
_ "gocloud.dev/pubsub/gcppubsub"

Expand Down
4 changes: 1 addition & 3 deletions cron/worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ import (
"flag"
"fmt"
"net/http"

// nolint:gosec
_ "net/http/pprof"
_ "net/http/pprof" // nolint:gosec

"go.opencensus.io/stats/view"

Expand Down
1 change: 0 additions & 1 deletion docs/checks/internal/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package internal

import (

// Used to embed `checks.yaml` file.
_ "embed"
"fmt"
Expand Down
5 changes: 3 additions & 2 deletions policy/policy.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.17

require (
github.com/golang/mock v1.6.0
github.com/golangci/golangci-lint v1.44.0
github.com/golangci/golangci-lint v1.44.2
github.com/google/addlicense v1.0.0
github.com/google/ko v0.10.0
github.com/goreleaser/goreleaser v1.5.0
Expand Down Expand Up @@ -74,11 +74,11 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bkielbasa/cyclop v1.2.0 // indirect
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb // indirect
github.com/blizzy78/varnamelen v0.5.0 // indirect
github.com/blizzy78/varnamelen v0.6.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.0.2 // indirect
github.com/bombsimon/wsl/v3 v3.3.0 // indirect
github.com/breml/bidichk v0.2.1 // indirect
github.com/breml/errchkjson v0.2.1 // indirect
github.com/breml/bidichk v0.2.2 // indirect
github.com/breml/errchkjson v0.2.3 // indirect
github.com/butuzov/ireturn v0.1.1 // indirect
github.com/caarlos0/ctrlc v1.0.0 // indirect
github.com/caarlos0/env/v6 v6.9.1 // indirect
Expand All @@ -96,7 +96,7 @@ require (
github.com/containerd/containerd v1.5.9 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.11.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/daixiang0/gci v0.2.9 // indirect
github.com/daixiang0/gci v0.3.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denis-tingajkin/go-header v0.4.2 // indirect
github.com/dghubble/go-twitter v0.0.0-20211115160449-93a8679adecb // indirect
Expand Down Expand Up @@ -188,11 +188,11 @@ require (
github.com/kisielk/errcheck v1.6.0 // indirect
github.com/kisielk/gotool v1.0.0 // indirect
github.com/klauspost/compress v1.14.2 // indirect
github.com/kulti/thelper v0.5.0 // indirect
github.com/kulti/thelper v0.5.1 // indirect
github.com/kunwardeep/paralleltest v1.0.3 // indirect
github.com/kyoh86/exportloopref v0.1.8 // indirect
github.com/ldez/gomoddirectives v0.2.2 // indirect
github.com/ldez/tagliatelle v0.3.0 // indirect
github.com/ldez/tagliatelle v0.3.1 // indirect
github.com/leonklingele/grouper v1.1.0 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/maratori/testpackage v1.0.1 // indirect
Expand All @@ -205,7 +205,7 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 // indirect
github.com/mgechev/revive v1.1.3 // indirect
github.com/mgechev/revive v1.1.4 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
Expand Down Expand Up @@ -272,7 +272,7 @@ require (
github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/ultraware/funlen v0.0.3 // indirect
github.com/ultraware/whitespace v0.0.4 // indirect
github.com/ultraware/whitespace v0.0.5 // indirect
github.com/uudashr/gocognit v1.0.5 // indirect
github.com/vbatts/tar-split v0.11.2 // indirect
github.com/xanzy/go-gitlab v0.55.1 // indirect
Expand Down
Loading

0 comments on commit 33f80c9

Please sign in to comment.