Skip to content

feat: Add lipgloss-styled human output for requirement analysis commands (#219) - #241

Open
sedonnel wants to merge 1 commit into
mainfrom
sedonnel/219-lipgloss-styled-human-output
Open

feat: Add lipgloss-styled human output for requirement analysis commands (#219)#241
sedonnel wants to merge 1 commit into
mainfrom
sedonnel/219-lipgloss-styled-human-output

Conversation

@sedonnel

Copy link
Copy Markdown

feat: Add lipgloss-styled human output for requirement analysis commands (#219)

Changes

  • cmd/complypack/cli/styling.go

    • Added share styling definitions and rendering helpers.
  • cmd/complypack/cli/applicability.go, cmd/complypack/cli/delta.go, cmd/complypack/cli/requirements.go, cmd/complypack/cli/triage.go

    • Added implementation for human output function.
  • cmd/complypack/cli/coverage.go

    • Refactored to remove styling varables (moved to styling.go).
    • Refactored existing use of lipgloss to use styling.go.
  • cmd/complypack/cli/applicability_test.go

    • Refactored write human test to no longer delegate to text.
    • Added NoGroups test to align with text testing.
  • cmd/complypack/cli/delta_test.go

    • Refactored write human test to no longer delegate to text.
    • Added NoComparissons test to align with text testing.
  • cmd/complypack/cli/requirements_test.go

    • Refactored write human test to no longer delegate to text.
    • Added Empty test to align with previous tests.
  • cmd/complypack/cli/triage_test.go

    • Refactored write human test to no longer delegate to text
    • Added NoPlans test to align with previous tests

Summary

Added generic styling.go for reusable generic helper functions for lipgloss styling. Refactored applicability.go, delta.go, requirements.go, triage.go and coverage.go to use lipgloss styled output for human readable reports. Also refactored applicable tests to test the human output.

Related Issues

…nds (#219)

- cmd/complypack/cli/styling.go
  - Added share styling definitions and rendering helpers.

- cmd/complypack/cli/applicability.go
- cmd/complypack/cli/delta.go
- cmd/complypack/cli/requirements.go
- cmd/complypack/cli/triage.go
  - Added implementation for human output function.

- cmd/complypack/cli/coverage.go
  - Refactored to remove styling varables (moved to styling.go).
  - Refactored existing use of lipgloss to use styling.go.

- cmd/complypack/cli/applicability_test.go
  - Refactored write human test to no longer delegate to text.
  - Added NoGroups test to align with text testing.

- cmd/complypack/cli/delta_test.go
  - Refactored write human test to no longer delegate to text.
  - Added NoComparissons test to align with text testing.

- cmd/complypack/cli/requirements_test.go
  - Refactored write human test to no longer delegate to text.
  - Added Empty test to align with previous tests.

- cmd/complypack/cli/triage_test.go
  - Refactored write human test to no longer delegate to text
  - Added NoPlans test to align with previous tests
@sedonnel
sedonnel requested a review from a team as a code owner August 19, 2026 15:02
@github-actions

Copy link
Copy Markdown

✅ CRAP Load Analysis: PASS (no baseline)

No baseline file found at .gaze/baseline.json. Showing current scores without regression detection.

How to Enable Regression Detection

Generate and commit a baseline file to track CRAP score changes over time:

# 1. Install gaze
go install github.com/unbound-force/gaze/cmd/gaze@latest

# 2. Run tests and generate baseline
go test -coverprofile=coverage.out ./...
mkdir -p .gaze
gaze crap --format=json --coverprofile=coverage.out ./... > .gaze/baseline.json

# 3. Commit the baseline
git add .gaze/baseline.json
git commit -m "chore: add CRAP baseline for regression detection"

For more information:

Summary

Metric Value
Functions analysed 75
Avg complexity 4.9
Avg line coverage 80%
Avg CRAP score 21.8
CRAPload (>= 15) 11
Avg contract coverage 0%
Avg GazeCRAP score 2
GazeCRAPload (>= 15) 0

View full analysis logs

@marcusburghardt

Copy link
Copy Markdown
Member

@sedonnel the lint issue seems to be legit. Could you take a look, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add lipgloss-styled human output for requirement analysis commands

3 participants