Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add golangci-lint support #23

Merged
merged 1 commit into from
Jun 3, 2022
Merged

Add golangci-lint support #23

merged 1 commit into from
Jun 3, 2022

Conversation

marctc
Copy link
Contributor

@marctc marctc commented Jun 3, 2022

Added golanci-lint support to the pipeline. This fixes #18.
The config is taken from the Agent repo.

I fixed some lint issues but I keept the following:

vsphere/client.go:45:2: `closeGate` is unused (structcheck)
	closeGate sync.Once
	^
vsphere/endpoint.go:41:2: `pKey` is unused (structcheck)
	pKey             string
	^
vsphere/endpoint.go:42:2: `parentTag` is unused (structcheck)
	parentTag        string
	^
vsphere/endpoint.go:51:2: `parent` is unused (structcheck)
	parent           string
	^
vsphere/endpoint.go:53:2: `lastColl` is unused (structcheck)
	lastColl         time.Time
	^
vsphere/endpoint.go:68:80: newEndpoint - result 1 (error) is always nil (unparam)
func newEndpoint(cfg *vSphereConfig, url *url.URL, log log.Logger) (*endpoint, error) {
                                                                               ^
vsphere/vsphere.go:33:2: `cancel` is unused (structcheck)
	cancel context.CancelFunc

@rlankfo maybe you want to look at them as I don't have much context.

@marctc marctc requested a review from rlankfo June 3, 2022 10:06
Copy link
Member

@rlankfo rlankfo left a comment

Choose a reason for hiding this comment

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

hey @marctc, thanks for putting this together. This looks good to me 👍

I'll go ahead and merge even with some of the existing lint errors but will plan to get this cleaned up shortly. Some of the unused stuff will start getting used once we are applying hierarchy labels on our metrics which should be coming soon.

@rlankfo rlankfo merged commit ec16fe8 into main Jun 3, 2022
@marctc marctc deleted the add_linter branch June 7, 2022 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add golangci-lint ci job
2 participants