Enable `tagliatelle` linter rule
ademidoff opened this issue · 5 comments
Description
Ref: #1541
We'd like to enable tagliatelle
linter rule.
Suggested solution
- evaluate if we can afford to enable the rule
- if yes, fix all linter error to make tests pass
- if not, disable the rule and leave a comment explaining why (subject to review by the dev team)
Additional context
The rule can be enabled by simply removing this line.
You can check similar PRs to see how we enabled some other rules (ref: #1541)
Code of Conduct
- I agree to follow this project's Code of Conduct
Hi @artemgavrilov i enabled the tagliatelle linter and checked for the linter warnings i did not find any warning on tagliatelle but got these
managed/utils/platform/client.go:286:67: directive //nolint:tagliatelle is unused for linter "tagliatelle" (nolintlint) GrafanaClientID string json:"grafana_client_id" //nolint:tagliatelle ^managed/utils/platform/client.go:287:67: directive //nolint:tagliatelle is unused for linter "tagliatelle" (nolintlint) PMMManagedClientID string json:"pmm_managed_client_id" //nolint:tagliatelle ^managed/utils/platform/client.go:288:67: directive //nolint:tagliatelle is unused for linter "tagliatelle" (nolintlint) PMMManagedClientSecret string json:"pmm_managed_client_secret" //nolint:tagliatelle
will these be counted as linter warning for tagliatelle ?
HI @BupycHuk @atymchuk and @artemgavrilov any update on above or should raise a PR with linter rule enabled
?
Hi @vishwas-sharma2480, yeah those seems like a valid warnings. please remove //nolint
directives for them. Thank you
Hi @BupycHuk I tried resolving the warnings as suggested but i got this new warning instead
managed/utils/platform/client.go:286: File is not gci-ed with --skip-generated -s standard -s default -s prefix(github.com/percona/pmm) (gci)
GrafanaClientID string json:"grafana_client_id"
PMMManagedClientID string json:"pmm_managed_client_id"
PMMManagedClientSecret string json:"pmm_managed_client_secret"
Hi @BupycHuk I tried resolving the warnings as suggested but i got this new warning instead managed/utils/platform/client.go:286: File is not gci-ed with --skip-generated -s standard -s default -s prefix(github.com/percona/pmm) (gci) GrafanaClientID string json:"grafana_client_id" PMMManagedClientID string json:"pmm_managed_client_id" PMMManagedClientSecret string json:"pmm_managed_client_secret"
Use make format
command, it will properly format sources.
P.S. before use make init
to install required tools.