Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Fix golangci errors #1058

Merged
merged 5 commits into from
Aug 28, 2019
Merged

Conversation

laverya
Copy link
Member

@laverya laverya commented Aug 28, 2019

What I Did

Added golangci to our CI testing. Fixed the errors it identified. Fixes #1056.

How I Did it

Lots of code fixes.

How to verify it

the lint job runs successfully

Description for the Changelog

Picture of a Ship (not required but encouraged)

USS United States (CVA-58)

seperate 'lint' and 'test' CI steps

'go test' and 'go build' should use files from the 'vendor' folder

pact tests should use go modules

use vendor in 'go vet'

run golangci-lint on each subdir in pkg individually in ci

skip running golangci-lint on integration tests

go-bindata and go-modules do not get along
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 43337 lines exceeds the maximum allowed for the inline comments feature.


}
}
// func (d *V1Routes) requireKustomize() gin.HandlerFunc {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove it if not used?


}
}
// func (d *V1Routes) requireUnfork() gin.HandlerFunc {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove it if not used?

go get github.com/golang/mock/gomock
go install github.com/golang/mock/mockgen
go get github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs
go get -u github.com/jteeuwen/go-bindata/go-bindata
go get -u github.com/gordonklaus/ineffassign
GO111MODULE=auto go get -u github.com/jteeuwen/go-bindata/go-bindata
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto is kind of mysterious. can this be either off or on? i think off is what you want here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a better idea, yeah

Copy link
Member

@divolgin divolgin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some comments

use 'GO111MODULE=off' not 'auto' to disable

remove commented out unused functions
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 43290 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 43284 lines exceeds the maximum allowed for the inline comments feature.

@laverya laverya merged commit 6f1955f into replicatedhq:master Aug 28, 2019
@laverya laverya deleted the fix-golangci-errors branch August 28, 2019 20:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'golangci-lint' reports many errors
2 participants