Skip to content

Commit

Permalink
build, nogo, linter: add errcheck
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Aug 4, 2022
1 parent 65d21a2 commit fa3eca8
Show file tree
Hide file tree
Showing 68 changed files with 14,029 additions and 0 deletions.
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ nogo(
"//vendor/github.com/nunnatsa/ginkgolinter:go_default_library",
"//tools/analyzers/banncheck:go_default_library",
"//vendor/github.com/gordonklaus/ineffassign/pkg/ineffassign:go_default_library",
"//vendor/github.com/kisielk/errcheck/errcheck:go_default_library",
"@org_golang_x_tools//go/analysis/passes/asmdecl:go_default_library",
"@org_golang_x_tools//go/analysis/passes/assign:go_default_library",
"@org_golang_x_tools//go/analysis/passes/atomic:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ require (
github.com/imdario/mergo v0.3.11
github.com/insomniacslk/dhcp v0.0.0-20201112113307-4de412bc85d8
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.3.0
github.com/kisielk/errcheck v1.6.2
github.com/krolaw/dhcp4 v0.0.0-20180925202202-7cead472c414
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0
github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b
Expand Down Expand Up @@ -138,6 +139,7 @@ require (
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae // indirect
github.com/willf/bitset v1.1.11 // indirect
go.mongodb.org/mongo-driver v1.8.4 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,8 @@ github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/errcheck v1.6.2 h1:uGQ9xI8/pgc9iOoCe7kWQgRE6SBTrCGmTSf0LrEtY7c=
github.com/kisielk/errcheck v1.6.2/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
Expand Down Expand Up @@ -1494,6 +1496,7 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -1829,6 +1832,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM=
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY=
golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
29 changes: 29 additions & 0 deletions nogo_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,34 @@
"vendor/": "vendor doesn't pass vet",
"external/": "externaldoesn't pass vet"
}
},
"errcheck": {
"exclude_files": {
"vendor/": "vendor doesn't pass errcheck",
"external/": "external doesn't pass errcheck",
"src/": "golang core code does not pass errcheck",
"bazel-out/": "this directory should be off-limits to errcheck",
"pkg/": "KubeVirt pkg does not pass errcheck yet",
"cmd/": "KubeVirt binaries do not pass errcheck yet",
"tools/": "KubeVirt tools do not pass errcheck yet",
"tests/console": "tests/console does not pass errcheck yet",
"tests/libstorage/": "tests/libstorage does not pass errcheck yet",
"tests/libnode/": "libnode does not pass errcheck yet",
"tests/monitoring/": "tests/monitoring does not pass errcheck yet",
"tests/network/": "tests/network/ pkg does not pass errcheck yet",
"tests/reporter/": "tests/reporter pkg does not pass errcheck yet",
"tests/storage/": "tests/storage/ pkg does not pass errcheck yet",
"tests/virtctl/": "tests/virtctl/ pkg does not pass errcheck yet",
"tests/canary_upgrade_test.go": "canary_upgrade_test does not pass errcheck yet",
"tests/infra_test.go": "infra_test.go does not pass errcheck yet",
"tests/kubectl_test.go": "kubectl_test does not pass errcheck yet",
"tests/migration_test.go": "migration_test does not pass errcheck yet",
"tests/replicaset_test.go": "replicaset_test does not pass errcheck yet",
"tests/usbredir_test.go": "kubectl_test does not pass errcheck yet",
"tests/utils.go": "utils.go does not pass errcheck yet",
"tests/vmi_configuration_test.go": "vmi_configuration_test does not pass errcheck yet",
"tests/vmi_lifecycle_test.go": "vmi_lifecycle_test does not pass errcheck yet",
"tests/vnc_test.go": "vnc_test does not pass errcheck yet"
}
}
}
1 change: 1 addition & 0 deletions tools/analyzers/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//vendor/github.com/gordonklaus/ineffassign/pkg/ineffassign:go_default_library",
"//vendor/github.com/kisielk/errcheck/errcheck:go_default_library",
"//vendor/github.com/nunnatsa/ginkgolinter:go_default_library",
],
)
1 change: 1 addition & 0 deletions tools/analyzers/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ package analyzers
// Keep a reference to analyzers
import (
_ "github.com/gordonklaus/ineffassign/pkg/ineffassign"
_ "github.com/kisielk/errcheck/errcheck"
_ "github.com/nunnatsa/ginkgolinter"
)
22 changes: 22 additions & 0 deletions vendor/github.com/kisielk/errcheck/LICENSE

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

20 changes: 20 additions & 0 deletions vendor/github.com/kisielk/errcheck/errcheck/BUILD.bazel

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

77 changes: 77 additions & 0 deletions vendor/github.com/kisielk/errcheck/errcheck/analyzer.go

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

143 changes: 143 additions & 0 deletions vendor/github.com/kisielk/errcheck/errcheck/embedded_walker.go

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

Loading

0 comments on commit fa3eca8

Please sign in to comment.