Merged
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]>
Contributor
There was a problem hiding this comment.
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]>
ywwg
approved these changes
Aug 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable previously disabled revive rules, to harmonize with Prometheus:
Also fixing caught issues.