Skip to content

Add a diagnostics/doctor mode for integration troubleshooting (CLI flag + sbt task) #27

Description

@miroslavpojer

Feature Description

Provide a “doctor” mode that prints resolved configuration and common failure checks for both CLI usage and sbt plugin usage (e.g. --diagnostics and jmfDoctor).

Problem / Opportunity

  • When coverage output is wrong, users don’t know if the rewriter ran, rules matched, paths were correct, or JaCoCo used filtered classes.
  • Debugging integration issues currently requires reading plugin internals or enabling ad-hoc logging.

Acceptance Criteria

  1. CLI diagnostics prints: resolved --in, --out, --rules, number of class files scanned, number of methods marked, and (optional) a few sample matches.
  2. sbt task prints: resolved rules file path, input/output class directories per module, whether enabled, and where reports will be generated.
  3. Diagnostics output is stable and copy-pasteable into bug reports.
  4. Diagnostics mode does not modify classes unless explicitly requested (safe by default).

Proposed Solution

  • Add a structured, human-readable report (and optionally JSON) for troubleshooting.
  • Reuse the same underlying reporting logic in CLI and sbt plugin when possible.

Dependencies / Related

Complements the existing dry-run functionality; not the same as #6/#16/#17.

Additional Context

This should reduce support load and speed up adoption in CI pipelines.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions