-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Feel free to propose other implementation details / output structure.
Is your feature request related to a problem? Please describe.
Users who want to attach Plumber results to GitLab MR descriptions, wikis, or external documentation have no way to get a portable, readable text output. The current --output flag produces JSON only, and the terminal output uses ANSI escape codes that don't copy-paste well.
Describe the solution you'd like
Add a --summary-markdown flag to the analyze command that writes a clean Markdown-formatted compliance report to a file path.
The Markdown should include:
- Project name and analysis timestamp
- A table of all controls with compliance % and issue count (mirrors the existing printComplianceTable logic)
- A collapsible details block per control listing specific issues
Implementation Hints
This is just a proposition. Feel free to change.
- Add the flag in
cmd/analyze.gonext tooutputFile - Reuse the existing result
*control.AnalysisResult: all data is already available - Create a new function writeMarkdownToFile(result, threshold, compliance, filePath) following the same pattern as writeJSONToFile
- No new dependencies needed: just
fmt.Sprintfandos.WriteFile
Files Touched
cmd/analyze.go (add flag + write function)
Why It's Valuable
Enables integration with GitLab MR descriptions, wikis, Confluence pages, and CI/CD artifact previews. This is a natural complement to the existing JSON output.
Reactions are currently unavailable