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 lint step to PR pipeline #36

Closed
wants to merge 3 commits into from

Conversation

leizor
Copy link
Contributor

@leizor leizor commented Mar 25, 2022

This PR is based off of #35

@grafanabot

This comment has been minimized.

@grafanabot

This comment has been minimized.

@grafanabot

This comment has been minimized.

@grafanabot

This comment has been minimized.

@grafanabot

This comment has been minimized.

@grafanabot

This comment has been minimized.

@grafanabot

This comment has been minimized.

@grafanabot

This comment has been minimized.

1 similar comment
@grafanabot

This comment has been minimized.

@grafanabot
Copy link

coverage_report.out

lint.out

@grafanabot

This comment has been minimized.

@grafanabot

This comment has been minimized.

@grafanabot
Copy link

Go coverage report:

Click to expand.
File %
github.com/grafana/influx2cortex/pkg/errorx/errors.go 67.3%
github.com/grafana/influx2cortex/pkg/errorx/http_translator.go 100.0%
github.com/grafana/influx2cortex/pkg/influx/api.go 95.0%
github.com/grafana/influx2cortex/pkg/influx/errors.go 100.0%
github.com/grafana/influx2cortex/pkg/influx/parser.go 83.8%
github.com/grafana/influx2cortex/pkg/influx/recorder.go 100.0%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go 69.1%
github.com/grafana/influx2cortex/pkg/remotewrite/measured_client.go 88.9%
github.com/grafana/influx2cortex/pkg/remotewrite/recorder.go 100.0%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go 75.6%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go 91.7%
github.com/grafana/influx2cortex/pkg/util/extract_forwarded.go 66.7%
github.com/grafana/influx2cortex/pkg/util/http.go 68.3%
github.com/grafana/influx2cortex/pkg/util/log/experimental.go 0.0%
github.com/grafana/influx2cortex/pkg/util/log/log.go 0.0%
github.com/grafana/influx2cortex/pkg/util/log/rate_limit.go 90.0%
github.com/grafana/influx2cortex/pkg/util/log/wrappers.go 0.0%
github.com/grafana/influx2cortex/pkg/util/push/push.go 60.0%
total 73.1%

Go lint report:

Click to expand.
pkg/influx/api.go:17:5: `ingesterClientRequestDuration` is unused (deadcode)
var ingesterClientRequestDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{
    ^
pkg/errorx/http_translator.go:27:23: Error return value of `(github.com/go-kit/log.Logger).Log` is not checked (errcheck)
		level.Error(log).Log("msg", "canceled", "response_code", code, "err", err)
		                    ^
pkg/errorx/http_translator.go:32:23: Error return value of `(github.com/go-kit/log.Logger).Log` is not checked (errcheck)
			level.Warn(log).Log("msg", errx.Message(), "response_code", code, "err", tryUnwrap(errx))
			                   ^
pkg/errorx/http_translator.go:34:24: Error return value of `(github.com/go-kit/log.Logger).Log` is not checked (errcheck)
			level.Error(log).Log("msg", errx.Message(), "response_code", code, "err", tryUnwrap(errx))
			                    ^
pkg/util/log/log.go:60:13: Error return value of `logger.Log` is not checked (errcheck)
		logger.Log("err", fmt.Sprintf("%+v", err))
		          ^
cmd/influx2cortex/main.go:9:2: SA1019: package github.com/go-kit/kit/log is deprecated: Use github.com/go-kit/log instead. (staticcheck)
	"github.com/go-kit/kit/log"
	^
cmd/influx2cortex/main.go:10:2: SA1019: package github.com/go-kit/kit/log/level is deprecated: Use github.com/go-kit/log/level instead. (staticcheck)
	"github.com/go-kit/kit/log/level"
	^
pkg/errorx/http_translator.go:8:2: SA1019: package github.com/go-kit/kit/log is deprecated: Use github.com/go-kit/log instead. (staticcheck)
	"github.com/go-kit/kit/log"
	^
pkg/errorx/http_translator.go:9:2: SA1019: package github.com/go-kit/kit/log/level is deprecated: Use github.com/go-kit/log/level instead. (staticcheck)
	"github.com/go-kit/kit/log/level"
	^
pkg/influx/api.go:8:2: SA1019: package github.com/go-kit/kit/log is deprecated: Use github.com/go-kit/log instead. (staticcheck)
	"github.com/go-kit/kit/log"
	^
pkg/influx/api.go:9:2: SA1019: package github.com/go-kit/kit/log/level is deprecated: Use github.com/go-kit/log/level instead. (staticcheck)
	"github.com/go-kit/kit/log/level"
	^

@leizor
Copy link
Contributor Author

leizor commented Mar 25, 2022

Alright, looking good! Gonna close this and #35 and re-open a combined one.

@leizor leizor closed this Mar 25, 2022
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.

None yet

2 participants