Skip to content

Add CLI flag to output audit report in JSON format #175

Description

@casks-mutters

Currently, the audit tool outputs results only in human-readable text. This is useful for manual inspection but makes it difficult to integrate the tool into automated pipelines or consume results programmatically.

Feature request:
Add a CLI flag (e.g., --json or --output json) that returns the full audit report as structured JSON.

Why this is useful

  • CI/CD systems can parse JSON more reliably than text.
  • Other tools could consume audit results as structured data.
  • Enables long-term storage of audit findings in databases or dashboards.

Proposed behavior

  • When the flag is set, print JSON to stdout.
  • Keep the existing text output as the default.
  • Document the new flag in the README.

Possible JSON fields:

{
  "summary": {
    "entries_total": 0,
    "entries_valid": 0,
    "entries_invalid": 0
  },
  "invalid_entries": [
    {
      "line_number": 0,
      "reason": "string",
      "raw": "string"
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions