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 promlinter to lint metrics name #1265

Merged
merged 5 commits into from Mar 30, 2021
Merged

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Jul 23, 2020

Signed-off-by: Ben Ye yb532204897@gmail.com

This pr adds a linter for Prometheus metric naming. https://github.com/yeya24/promlinter

@boring-cyborg
Copy link

boring-cyborg bot commented Jul 23, 2020

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented Jul 23, 2020

CLA assistant check
All committers have signed the CLA.

@sayboras
Copy link
Member

sayboras commented Aug 7, 2020

@yeya24 awesome, let me know if you need any help 👍

@SVilgelm
Copy link
Member

@yeya24 Are you still interesting In adding this linter? Could you please resolve merge conflicts?

@sayboras
Copy link
Member

Mark as draft PR to avoid showing up in review list.

@sayboras sayboras marked this pull request as draft October 17, 2020 08:16
@ldez ldez added feedback required Requires additional feedback linter: new Support new linter labels Dec 27, 2020
@yeya24
Copy link
Contributor Author

yeya24 commented Feb 17, 2021

Sorry for the lag. Working on this pr now.

Signed-off-by: Ben Ye <yb532204897@gmail.com>
Signed-off-by: yeya24 <yb532204897@gmail.com>
@yeya24 yeya24 changed the title WIP: Add promlinter to lint metrics name Add promlinter to lint metrics name Mar 29, 2021
@yeya24 yeya24 marked this pull request as ready for review March 29, 2021 01:17
@yeya24
Copy link
Contributor Author

yeya24 commented Mar 29, 2021

@sayboras Sorry for the delay. This is ready for review now.

Signed-off-by: yeya24 <yb532204897@gmail.com>
pkg/golinters/promlinter.go Outdated Show resolved Hide resolved
pkg/lint/lintersdb/manager.go Outdated Show resolved Hide resolved
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

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

I recommend using tags (ex: v0.1.0) instead of pseudo-version (v0.0.0-20210328235706-000c7d74ddb3) like that dependabot will be able to track the changes.

.golangci.example.yml Outdated Show resolved Hide resolved
.golangci.example.yml Outdated Show resolved Hide resolved
Signed-off-by: yeya24 <yb532204897@gmail.com>
@yeya24
Copy link
Contributor Author

yeya24 commented Mar 29, 2021

@ldez Thanks for the quick and detailed review. I have updated my pr, PTAL.

Copy link
Member

@bombsimon bombsimon left a comment

Choose a reason for hiding this comment

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

Nice, LGTM

@yeya24
Copy link
Contributor Author

yeya24 commented Mar 29, 2021

Hi, is this pr good to go? Or anything else I should change?

pkg/golinters/promlinter.go Outdated Show resolved Hide resolved
Signed-off-by: yeya24 <yb532204897@gmail.com>
@ldez ldez removed the feedback required Requires additional feedback label Mar 30, 2021
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

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

thanks 👍

@ldez ldez merged commit 6844f6a into golangci:master Mar 30, 2021
@golangci-automator
Copy link

Hey, @yeya24 — we just merged your PR to golangci-lint! 🔥🚀

golangci-lint is built by awesome people like you. Let us say “thanks”: we just invited you to join the GolangCI organization on GitHub.
This will add you to our team of maintainers. Accept the invite by visiting this link.

By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.
More information about contributing is here.

Thanks again!

@yeya24 yeya24 deleted the support-promlinter branch March 30, 2021 13:17
@ldez ldez added this to the v1.40 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter: new Support new linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants