-
Notifications
You must be signed in to change notification settings - Fork 333
Enable revive rules #823
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 revive rules #823
Conversation
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables previously disabled revive linting rules to harmonize with Prometheus standards and fixes the caught linting issues. The changes focus on standardizing receiver naming conventions and improving code quality.
Key changes:
- Enable 10 revive linting rules including receiver-naming, var-naming, and increment-decrement
- Fix receiver parameter names to follow Go conventions (use consistent short names)
- Apply early-return pattern and increment/decrement optimizations
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
.golangci.yml | Enables previously disabled revive linting rules |
server/static_file_server_test.go | Removes unused receiver parameter |
model/value_type.go | Standardizes receiver name from 'e' to 'et' |
model/value_histogram.go | Changes receiver name from 'b' to 's' for consistency |
model/value.go | Changes receiver name from 'mat' to 'm' for brevity |
model/time.go | Removes unused receiver parameter |
model/metric.go | Removes unused receiver parameter |
model/labelset.go | Standardizes receiver names from 'l' to 'ls' |
expfmt/text_parse.go | Applies early-return pattern for better flow control |
expfmt/expfmt.go | Fixes receiver naming and adds lint suppressions |
config/http_config.go | Uses increment operator and removes unused receivers |
config/config.go | Removes redundant bool type declaration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Arve Knudsen <[email protected]>
Enable previously disabled revive rules, to harmonize with Prometheus:
Also fixing caught issues.