Skip to content

fix(cli): add line break before first violation in multi-policy output#2902

Merged
jiparis merged 1 commit into
chainloop-dev:mainfrom
jiparis:jiparis/fix-policy-table-linebreak
Mar 20, 2026
Merged

fix(cli): add line break before first violation in multi-policy output#2902
jiparis merged 1 commit into
chainloop-dev:mainfrom
jiparis:jiparis/fix-policy-table-linebreak

Conversation

@jiparis

@jiparis jiparis commented Mar 20, 2026

Copy link
Copy Markdown
Member

Summary

  • When a policy evaluation has multiple violations, the first violation was displayed inline with the policy name while subsequent ones were properly indented with \n - . This adds the same line break before the first violation for consistent formatting.
  • Single-violation policies remain inline as before.
┌───────────────────────────┬───────────────────────────────────────────────┐
│ Initialized At            │ 20 Mar 26 17:31 UTC                           │
├───────────────────────────┼───────────────────────────────────────────────┤
│ Attestation ID            │ e5ad061e-deb3-4d2f-a180-701ebb7490ac          │
│ Organization              │ my-org                                        │
│ Name                      │ aiworkflow2                                   │
│ Project                   │ my-project                                    │
│ Version                   │ v1.83.0+next (prerelease)                     │
│ Contract                  │ chainloop-platform-pr-validation (revision 2) │
│ Policy violation strategy │ ENFORCED                                      │
│ Policies                  │ ------                                        │
│                           │ test (gate):                                  │
│                           │   - violation1                                │
│                           │   - violation2                                │
│                           │   - violation3                                │
└───────────────────────────┴───────────────────────────────────────────────┘

Closes #2898

When a policy evaluation has multiple violations, the first violation
was displayed inline while subsequent ones were indented. This adds
a line break before the first violation too for consistent formatting.

Closes chainloop-dev#2898

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

@jiparis jiparis requested review from javirln and migmartri March 20, 2026 17:31
@jiparis jiparis merged commit c1f98ed into chainloop-dev:main Mar 20, 2026
15 checks passed
@jiparis jiparis deleted the jiparis/fix-policy-table-linebreak branch March 20, 2026 18: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.

bug: table output broken for multiple policy evaluation results

2 participants