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

Enable tagliatelle linter rule #2345

Open
1 task done
ademidoff opened this issue Jul 3, 2023 · 5 comments
Open
1 task done

Enable tagliatelle linter rule #2345

ademidoff opened this issue Jul 3, 2023 · 5 comments
Assignees

Comments

@ademidoff
Copy link
Member

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
@ademidoff ademidoff added the feature Feature request label Jul 3, 2023
@ademidoff ademidoff added enhancement and removed feature Feature request labels Jul 3, 2023
@artemgavrilov artemgavrilov added good first issue Good issue for newcomers hacktoberfest labels Jul 3, 2023
@vishwas-sharma2480
Copy link
Contributor

vishwas-sharma2480 commented Sep 11, 2023

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 ?

@vishwas-sharma2480
Copy link
Contributor

HI @BupycHuk @atymchuk and @artemgavrilov any update on above or should raise a PR with linter rule enabled
?

@BupycHuk
Copy link
Member

Hi @vishwas-sharma2480, yeah those seems like a valid warnings. please remove //nolint directives for them. Thank you

@vishwas-sharma2480
Copy link
Contributor

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"

@artemgavrilov
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants