Skip to content

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

Merged
marcusburghardt merged 4 commits into
mainfrom
sedonnel/219-lipgloss-styled-human-output
Sep 16, 2026
Merged

marcusburghardt merged 4 commits into
mainfrom
sedonnel/219-lipgloss-styled-human-output

Conversation

@sedonnel

Copy link
Copy Markdown
Contributor

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

@sedonnel
sedonnel requested a review from a team as a code owner August 19, 2026 15:02
@github-actions

github-actions Bot commented Aug 19, 2026 •

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 76
Avg complexity 4.9
Avg line coverage 80.2%
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?

@trevor-vaughan trevor-vaughan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint fix needed, but looks good otherwise.

@marcusburghardt

Copy link
Copy Markdown
Member

@sedonnel this is almost there. Could you fix the lint issues so can merge it, please?

@sedonnel
sedonnel force-pushed the sedonnel/219-lipgloss-styled-human-output branch from 89d0088 to 94843b8 Compare September 15, 2026 10:23
@sedonnel

Copy link
Copy Markdown
Contributor Author

@trevor-vaughan and @marcusburghardt, the linting issues have been fixed, and all checks are passing. Apologies for the delay.

@marcusburghardt

Copy link
Copy Markdown
Member

@trevor-vaughan and @marcusburghardt, the linting issues have been fixed, and all checks are passing. Apologies for the delay.

Great. Thanks @sedonnel

@marcusburghardt marcusburghardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marcusburghardt marcusburghardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for not catching this in the earlier review round — this one is on us.

One remaining item: the new styling.go is missing the required SPDX license header. Every other Go file in the package has it. Trivial fix.

Everything else looks good. The lint-fix commits are clean and narrowly scoped.

This review was generated by /review-pr (AI-assisted).

Comment thread cmd/complypack/cli/styling.go

@marcusburghardt marcusburghardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…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
- Fixed blocking linting issues
- Fixed further linting issues
@marcusburghardt
marcusburghardt force-pushed the sedonnel/219-lipgloss-styled-human-output branch from 0945e20 to a6994e3 Compare September 16, 2026 11:14
@marcusburghardt
marcusburghardt dismissed trevor-vaughan’s stale review September 16, 2026 11:35

Requested changes were addressed. Thanks

@marcusburghardt
marcusburghardt merged commit 1715c88 into main Sep 16, 2026
18 checks passed
@marcusburghardt
marcusburghardt deleted the sedonnel/219-lipgloss-styled-human-output branch September 16, 2026 11:35
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

4 participants