Skip to content

Make --format json emit parseable JSON or remove the option #3

@7shep

Description

@7shep

Problem

The CLI accepts --format json and describes the option as an output format in src/cli.ts, but the implementation still prints the same text report:

Context Drift

Files scanned: 14
Changed files: 0
Format: json

Naming conventions:
- camelCase: 29%
- lowercase: 71%

The new naming drift findings are also always rendered as text through printFindings.

Impact

Users and CI jobs that request JSON cannot parse the output as JSON. The Format: json line makes the output look intentionally selected while still being the markdown/text reporter.

Suggested Fix

Either implement a real JSON reporter for the summary, naming distribution, and findings, or remove/rename the json option until JSON output is actually supported.

Verification

Add a CLI test that runs check --format json, parses stdout with JSON.parse, and asserts the expected fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions