Skip to content

feat: add coverage command#12

Merged
k1LoW merged 2 commits into
mainfrom
coverage
Sep 9, 2025
Merged

feat: add coverage command#12
k1LoW merged 2 commits into
mainfrom
coverage

Conversation

@k1LoW
Copy link
Copy Markdown
Contributor

@k1LoW k1LoW commented Sep 9, 2025

This pull request introduces a new pipeline resolver step coverage feature and improves the user experience of several commands by adding a spinner to indicate progress. It also enhances the flexibility of resource loading with new options and adds support for fetching resolver execution results for coverage calculation. Several new dependencies are introduced to support these features.

New Coverage Feature:

  • Adds a new coverage command (cmd/coverage.go) that displays pipeline resolver step coverage, including options for time filtering and detailed reporting. This command uses a new Coverage method on the Client to analyze step coverage based on recent execution results. [1] [2]

User Experience Improvements:

  • Adds a spinner (progress indicator) to the lint and metrics commands to provide visual feedback during long-running operations. The spinner is started at the beginning of command execution and stopped before displaying results. [1] [2] [3] [4] [5]

Resource Loading Enhancements:

  • Refactors the Resources loader in tailor/resource.go to accept functional options, allowing selective loading of applications, pipelines, TailorDBs, and state flows. Adds support for loading resolver execution results since a specified time, which is necessary for coverage analysis. [1] [2] [3] [4] [5] [6] [7] F8bfd94dL8R8)

Dependency Updates:

  • Adds new dependencies: github.com/briandowns/spinner for the spinner, and github.com/k1LoW/duration for parsing duration strings in the coverage command. Updates go.mod accordingly.

Minor Cleanups:

  • Minor code style and import improvements for maintainability. [1] [2]

Let me know if you'd like a walkthrough of how the new coverage feature works or how to use the new resource loading options!

@k1LoW k1LoW self-assigned this Sep 9, 2025
@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 9, 2025

Code Metrics Report

Coverage Code to Test Ratio
32.5% 1:1.7

Code coverage of files in pull request scope (20.6%)

Files Coverage
cmd/coverage.go 0.0%
cmd/lint.go 0.0%
cmd/metrics.go 0.0%
cmd/root.go 0.0%
tailor/coverage.go 91.4%
tailor/metrics.go 100.0%
tailor/resource.go 0.0%

Reported by octocov

@k1LoW k1LoW merged commit 8df12fa into main Sep 9, 2025
1 check passed
@k1LoW k1LoW deleted the coverage branch September 9, 2025 03:01
@k1LoW k1LoW added minor breaking change enhancement New feature or request and removed breaking change labels Sep 9, 2025
@github-actions github-actions Bot mentioned this pull request Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant