-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add golang-ci with errcheck enabled to test suite to ensure all error…
…s produced are checked
- Loading branch information
1 parent
c577834
commit f02492a
Showing
15 changed files
with
1,522 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
linters: | ||
# Disable all linters. | ||
# Default: false | ||
disable-all: true | ||
# Enable specific linter | ||
# https://golangci-lint.run/usage/linters/#enabled-by-default-linters | ||
enable: | ||
- errcheck | ||
|
||
issues: | ||
exclude-rules: | ||
# Exclude some linters from running on tests files. | ||
- path: _test\.go | ||
linters: | ||
- errcheck | ||
|
||
linters-settings: | ||
errcheck: | ||
exclude-functions: | ||
- fmt.Fprintf | ||
- fmt.Fprint | ||
- (net/http.ResponseWriter).Write | ||
- (*net/http.Server).Shutdown | ||
- (*flag.FlagSet).Parse | ||
- (*os.File).Close | ||
- (io.Closer).Close | ||
- (flag.Value).Set | ||
- k8s.io/apimachinery/pkg/util/wait.PollUntil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
fmt.Fprintf | ||
fmt.Fprint | ||
(net/http.ResponseWriter).Write | ||
(*net/http.Server).Shutdown | ||
(*flag.FlagSet).Parse | ||
(*os.File).Close | ||
(io.Closer).Close | ||
(flag.Value).Set | ||
|
||
// We sometimes call this with a function that has no chance to error | ||
k8s.io/apimachinery/pkg/util/wait.PollUntil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
module k8s.io/ingress-gce/hack/tools | ||
|
||
go 1.19 | ||
|
||
require github.com/golangci/golangci-lint v1.47.0 | ||
|
||
require ( | ||
4d63.com/gochecknoglobals v0.1.0 // indirect | ||
github.com/Antonboom/errname v0.1.7 // indirect | ||
github.com/Antonboom/nilnil v0.1.1 // indirect | ||
github.com/BurntSushi/toml v1.2.0 // indirect | ||
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect | ||
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.2.2 // indirect | ||
github.com/Masterminds/semver v1.5.0 // indirect | ||
github.com/OpenPeeDeeP/depguard v1.1.0 // indirect | ||
github.com/alexkohler/prealloc v1.0.0 // indirect | ||
github.com/alingse/asasalint v0.0.11 // indirect | ||
github.com/ashanbrown/forbidigo v1.3.0 // indirect | ||
github.com/ashanbrown/makezero v1.1.1 // indirect | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/bkielbasa/cyclop v1.2.0 // indirect | ||
github.com/blizzy78/varnamelen v0.8.0 // indirect | ||
github.com/bombsimon/wsl/v3 v3.3.0 // indirect | ||
github.com/breml/bidichk v0.2.3 // indirect | ||
github.com/breml/errchkjson v0.3.0 // indirect | ||
github.com/butuzov/ireturn v0.1.1 // indirect | ||
github.com/cespare/xxhash/v2 v2.1.2 // indirect | ||
github.com/charithe/durationcheck v0.0.9 // indirect | ||
github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4 // indirect | ||
github.com/daixiang0/gci v0.6.2 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/denis-tingaikin/go-header v0.4.3 // indirect | ||
github.com/esimonov/ifshort v1.0.4 // indirect | ||
github.com/ettle/strcase v0.1.1 // indirect | ||
github.com/fatih/color v1.13.0 // indirect | ||
github.com/fatih/structtag v1.2.0 // indirect | ||
github.com/firefart/nonamedreturns v1.0.4 // indirect | ||
github.com/fsnotify/fsnotify v1.5.4 // indirect | ||
github.com/fzipp/gocyclo v0.6.0 // indirect | ||
github.com/go-critic/go-critic v0.6.3 // indirect | ||
github.com/go-toolsmith/astcast v1.0.0 // indirect | ||
github.com/go-toolsmith/astcopy v1.0.0 // indirect | ||
github.com/go-toolsmith/astequal v1.0.1 // indirect | ||
github.com/go-toolsmith/astfmt v1.0.0 // indirect | ||
github.com/go-toolsmith/astp v1.0.0 // indirect | ||
github.com/go-toolsmith/strparse v1.0.0 // indirect | ||
github.com/go-toolsmith/typep v1.0.2 // indirect | ||
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect | ||
github.com/gobwas/glob v0.2.3 // indirect | ||
github.com/gofrs/flock v0.8.1 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect | ||
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect | ||
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect | ||
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect | ||
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect | ||
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect | ||
github.com/golangci/misspell v0.3.5 // indirect | ||
github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect | ||
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect | ||
github.com/google/go-cmp v0.5.8 // indirect | ||
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect | ||
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect | ||
github.com/gostaticanalysis/comment v1.4.2 // indirect | ||
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect | ||
github.com/gostaticanalysis/nilerr v0.1.1 // indirect | ||
github.com/hashicorp/errwrap v1.0.0 // indirect | ||
github.com/hashicorp/go-multierror v1.1.1 // indirect | ||
github.com/hashicorp/go-version v1.6.0 // indirect | ||
github.com/hashicorp/hcl v1.0.0 // indirect | ||
github.com/hexops/gotextdiff v1.0.3 // indirect | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/jgautheron/goconst v1.5.1 // indirect | ||
github.com/jingyugao/rowserrcheck v1.1.1 // indirect | ||
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect | ||
github.com/julz/importas v0.1.0 // indirect | ||
github.com/kisielk/errcheck v1.6.2 // indirect | ||
github.com/kisielk/gotool v1.0.0 // indirect | ||
github.com/kulti/thelper v0.6.3 // indirect | ||
github.com/kunwardeep/paralleltest v1.0.6 // indirect | ||
github.com/kyoh86/exportloopref v0.1.8 // indirect | ||
github.com/ldez/gomoddirectives v0.2.3 // indirect | ||
github.com/ldez/tagliatelle v0.3.1 // indirect | ||
github.com/leonklingele/grouper v1.1.0 // indirect | ||
github.com/lufeee/execinquery v1.2.1 // indirect | ||
github.com/magiconair/properties v1.8.6 // indirect | ||
github.com/maratori/testpackage v1.1.0 // indirect | ||
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect | ||
github.com/mattn/go-colorable v0.1.12 // indirect | ||
github.com/mattn/go-isatty v0.0.14 // indirect | ||
github.com/mattn/go-runewidth v0.0.9 // indirect | ||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect | ||
github.com/mbilski/exhaustivestruct v1.2.0 // indirect | ||
github.com/mgechev/revive v1.2.1 // indirect | ||
github.com/mitchellh/go-homedir v1.1.0 // indirect | ||
github.com/mitchellh/mapstructure v1.5.0 // indirect | ||
github.com/moricho/tparallel v0.2.1 // indirect | ||
github.com/nakabonne/nestif v0.3.1 // indirect | ||
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect | ||
github.com/nishanths/exhaustive v0.8.1 // indirect | ||
github.com/nishanths/predeclared v0.2.2 // indirect | ||
github.com/olekukonko/tablewriter v0.0.5 // indirect | ||
github.com/pelletier/go-toml v1.9.5 // indirect | ||
github.com/pelletier/go-toml/v2 v2.0.2 // indirect | ||
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/polyfloyd/go-errorlint v1.0.0 // indirect | ||
github.com/prometheus/client_golang v1.12.1 // indirect | ||
github.com/prometheus/client_model v0.2.0 // indirect | ||
github.com/prometheus/common v0.32.1 // indirect | ||
github.com/prometheus/procfs v0.7.3 // indirect | ||
github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a // indirect | ||
github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect | ||
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect | ||
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect | ||
github.com/ryancurrah/gomodguard v1.2.4 // indirect | ||
github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect | ||
github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect | ||
github.com/securego/gosec/v2 v2.12.0 // indirect | ||
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect | ||
github.com/sirupsen/logrus v1.9.0 // indirect | ||
github.com/sivchari/containedctx v1.0.2 // indirect | ||
github.com/sivchari/nosnakecase v1.7.0 // indirect | ||
github.com/sivchari/tenv v1.7.0 // indirect | ||
github.com/sonatard/noctx v0.0.1 // indirect | ||
github.com/sourcegraph/go-diff v0.6.1 // indirect | ||
github.com/spf13/afero v1.8.2 // indirect | ||
github.com/spf13/cast v1.5.0 // indirect | ||
github.com/spf13/cobra v1.5.0 // indirect | ||
github.com/spf13/jwalterweatherman v1.1.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/spf13/viper v1.12.0 // indirect | ||
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect | ||
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect | ||
github.com/stretchr/objx v0.4.0 // indirect | ||
github.com/stretchr/testify v1.8.0 // indirect | ||
github.com/subosito/gotenv v1.4.0 // indirect | ||
github.com/sylvia7788/contextcheck v1.0.4 // indirect | ||
github.com/tdakkota/asciicheck v0.1.1 // indirect | ||
github.com/tetafro/godot v1.4.11 // indirect | ||
github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect | ||
github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect | ||
github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect | ||
github.com/ultraware/funlen v0.0.3 // indirect | ||
github.com/ultraware/whitespace v0.0.5 // indirect | ||
github.com/uudashr/gocognit v1.0.6 // indirect | ||
github.com/yagipy/maintidx v1.0.0 // indirect | ||
github.com/yeya24/promlinter v0.2.0 // indirect | ||
gitlab.com/bosi/decorder v0.2.3 // indirect | ||
go.uber.org/atomic v1.7.0 // indirect | ||
go.uber.org/multierr v1.6.0 // indirect | ||
go.uber.org/zap v1.17.0 // indirect | ||
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect | ||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect | ||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect | ||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect | ||
golang.org/x/text v0.3.7 // indirect | ||
golang.org/x/tools v0.1.12 // indirect | ||
google.golang.org/protobuf v1.28.0 // indirect | ||
gopkg.in/ini.v1 v1.66.6 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
honnef.co/go/tools v0.3.3 // indirect | ||
mvdan.cc/gofumpt v0.3.1 // indirect | ||
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect | ||
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect | ||
mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect | ||
) |
Oops, something went wrong.