Skip to content

Commit 225af2b

Browse files
committed
Re-enable presubmit linting
* Update to golangci 1.48.0 * Re-enable linting Signed-off-by: David Porter <[email protected]>
1 parent 4343efb commit 225af2b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ issues:
3939
- "(method|func) [A-Z].* should be .*"
4040
# Stuttering affects exported names:
4141
- "type name will be used as .*\\.[A-Z]{1}.* by other packages, and that stutters"
42+
# TODO: Migrate away from io/ioutil
43+
- "\"io/ioutil\" has been deprecated since Go 1.16"
4244
exclude-rules:
4345
# utils/cpuload/netlink/netlink.go:102:15: Error return value of `binary.Write` is not checked (errcheck)
4446
# There are more similar issues in this file

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
GO := go
16-
GOLANGCI_VER := v1.45.2
16+
GOLANGCI_VER := v1.48.0
1717
GO_TEST ?= $(GO) test $(or $(GO_FLAGS),-race)
1818
arch ?= $(shell go env GOARCH)
1919

@@ -74,7 +74,7 @@ docker-%:
7474
docker-build:
7575
@docker run --rm -w /go/src/github.com/google/cadvisor -v ${PWD}:/go/src/github.com/google/cadvisor golang:1.18 make build
7676

77-
presubmit: # lint : TODO re-enable lint after it works on golang 1.19
77+
presubmit: lint
7878
@echo ">> checking go mod tidy"
7979
@./build/check_gotidy.sh
8080
@echo ">> checking file boilerplate"

cmd/cadvisor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func createCollectorHTTPClient(collectorCert, collectorKey string) http.Client {
228228
}
229229

230230
tlsConfig.Certificates = []tls.Certificate{cert}
231-
tlsConfig.BuildNameToCertificate()
231+
tlsConfig.BuildNameToCertificate() //nolint: staticcheck
232232
}
233233

234234
transport := &http.Transport{

0 commit comments

Comments
 (0)