feat: add support for configurable acceptable thresholds in octocov output#29
Merged
feat: add support for configurable acceptable thresholds in octocov output#29
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for configurable acceptable metric thresholds in octocov custom metrics output, allowing users to define quality standards for their metrics that octocov can use for evaluation.
- Adds new configuration structure for defining acceptable thresholds in
.patterner.yml - Updates octocov output format to include configurable acceptable threshold conditions
- Expands documentation with examples and configuration details for the new feature
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| config/config.go | Adds Metrics and Octocov structs to support acceptables configuration |
| cmd/metrics.go | Updates CustomMetricSet to include acceptables field and populates it from config |
| README.md | Documents the new octocov integration, configuration options, and output format |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Contributor
Code Metrics Report
Details | | main (72cde31) | #29 (505863b) | +/- |
|---------------------|----------------|---------------|-------|
- | Coverage | 30.7% | 30.7% | -0.1% |
| Files | 12 | 12 | 0 |
| Lines | 481 | 482 | +1 |
| Covered | 148 | 148 | 0 |
- | Code to Test Ratio | 1:1.4 | 1:1.4 | -0.1 |
| Code | 1345 | 1354 | +9 |
| Test | 1924 | 1924 | 0 |
| Test Execution Time | 8s | 8s | 0s |Code coverage of files in pull request scope (0.0% → 0.0%)
Reported by octocov |
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.
This pull request adds support for configurable acceptable metric thresholds when exporting metrics in the octocov custom metrics format. Users can now define acceptable threshold conditions for their metrics in the
.patterner.ymlconfiguration file, and these thresholds will be included in the output when using the--out-octocov-pathoption. The documentation has been updated to explain the new configuration and output format.Octocov integration and configuration:
metrics.octocov.acceptablessection to.patterner.ymlfor specifying acceptable metric thresholds, which are included in the octocov custom metrics output. [1] [2] [3]Code changes to support acceptables:
CustomMetricSetstruct and metrics command implementation to include theacceptablesfield in the octocov output, pulling values from the config. [1] [2]Documentation updates:
README.mdto document the new octocov custom metrics format, how to configure acceptable thresholds, and provided an example output. [1] [2] [3]