Skip to content

Commit fd89a9c

Browse files
authoredSep 28, 2022
linter: fixes for staticcheck (#27)
1 parent 5605f69 commit fd89a9c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+330
-407
lines changed
 

‎Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ test-integration: ## Run integration tests
8282
@echo "# running integration tests"
8383
go test -tags="integration ${GO_BUILD_TAGS}" ./test/integration
8484

85-
.PHONY: lint
86-
lint: ## Run code linter
87-
@echo "# running linter"
88-
@golint ./...
85+
.PHONY: lint ## Run code linter
86+
lint:
87+
@gofmt -s -l . | diff -u /dev/null -
88+
@go vet ./...
89+
@golangci-lint run
90+
@echo "Done"
8991

9092
.PHONY: install
9193
install: install-generator install-proxy ## Install all

‎adapter/mock/mock_vpp_adapter.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -356,17 +356,17 @@ func (a *VppAdapter) WaitReady() error {
356356
// exactly two calls of this method.
357357
// For example:
358358
//
359-
// mockVpp.MockReply( // push multipart messages all at once
360-
// &interfaces.SwInterfaceDetails{SwIfIndex:1},
361-
// &interfaces.SwInterfaceDetails{SwIfIndex:2},
362-
// &interfaces.SwInterfaceDetails{SwIfIndex:3},
363-
// )
364-
// mockVpp.MockReply(&vpe.ControlPingReply{})
359+
// mockVpp.MockReply( // push multipart messages all at once
360+
// &interfaces.SwInterfaceDetails{SwIfIndex:1},
361+
// &interfaces.SwInterfaceDetails{SwIfIndex:2},
362+
// &interfaces.SwInterfaceDetails{SwIfIndex:3},
363+
// )
364+
// mockVpp.MockReply(&vpe.ControlPingReply{})
365365
//
366366
// Even if the multipart request has no replies, MockReply has to be called twice:
367367
//
368-
// mockVpp.MockReply() // zero multipart messages
369-
// mockVpp.MockReply(&vpe.ControlPingReply{})
368+
// mockVpp.MockReply() // zero multipart messages
369+
// mockVpp.MockReply(&vpe.ControlPingReply{})
370370
func (a *VppAdapter) MockReply(msgs ...api.Message) {
371371
a.repliesLock.Lock()
372372
defer a.repliesLock.Unlock()

0 commit comments

Comments
 (0)
Please sign in to comment.