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

New Linters(import aliases, log messages, cli help commands) #1525

Closed
Glyphack opened this issue Nov 24, 2020 · 6 comments
Closed

New Linters(import aliases, log messages, cli help commands) #1525

Glyphack opened this issue Nov 24, 2020 · 6 comments
Labels
enhancement New feature or improvement stale No recent correspondence or work activity

Comments

@Glyphack
Copy link

Is your feature request related to a problem? Please describe.
currently there are not linters for:

  • CLI help should be capitalized
  • log messages should not be capitalized
  • import aliases should be have a consistent pattern

Describe the solution you'd like
I would like to suggest Adding three rules to golangci-lint.

The first two linters are clear, but for the third one there is a rule we use at projectcontour.
So the rules for import alias would be:
consider import path: github.com/projectcontour/x/y/z/v*

  • the alias name should be subset of x[optional]_y[optional]_z[optional]_v* where optional means it can be present or not.
  • one of x or y or z must be present in alias name.
  • If version exists in path, must be specified.
@Glyphack Glyphack added the enhancement New feature or improvement label Nov 24, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Nov 24, 2020

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez ldez added the linter: new Support new linter label Feb 21, 2021
@ldez ldez added this to To do in Support more linters via automation Feb 21, 2021
@SVilgelm
Copy link
Member

so, the golangci-lint is a wrapper for the linters, so could you list the linters, if any, that supports your request?
if no such linters, then they should be implemented and can be integrated with golangci-lint

@ldez ldez removed the linter: new Support new linter label Feb 25, 2021
@Glyphack
Copy link
Author

Glyphack commented Feb 26, 2021

They are implemented already
https://github.com/projectcontour/lint
I can add them to golangci-lint as well.

@ldez
Copy link
Member

ldez commented Feb 26, 2021

@Glyphack do not hesitate to open a PR to add them 👍

@ldez
Copy link
Member

ldez commented Feb 26, 2021

@Glyphack about the import pattern we already added https://github.com/julz/importas

#1783

Not with the same approach as you, but can be complementary

@stale
Copy link

stale bot commented Mar 30, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent correspondence or work activity label Mar 30, 2022
@stale stale bot closed this as completed Apr 29, 2022
Support more linters automation moved this from To do to Done Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement stale No recent correspondence or work activity
Projects
No open projects
Development

No branches or pull requests

3 participants