App-Project-Doctor

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

# NAME

App::Project::Doctor - Unified pre-release health check for Perl CPAN distributions

# VERSION

0.02

# SYNOPSIS

    # Command line
    project-doctor [--check=Tests,CI] [--skip=Meta] [--fix] [PATH]

    # Programmatic
    use App::Project::Doctor;

    my $doctor = App::Project::Doctor->new(path => '/path/to/my-dist');
    my $report = $doctor->run;
    print $report->render_text;
    exit $report->exit_code;

# DESCRIPTION

Orchestrates a suite of diagnostic checks against a Perl CPAN distribution,
combining [App::Workflow::Lint](https://metacpan.org/pod/App%3A%3AWorkflow%3A%3ALint), [App::GHGen::Generator](https://metacpan.org/pod/App%3A%3AGHGen%3A%3AGenerator), [App::makefilepl2cpanfile](https://metacpan.org/pod/App%3A%3Amakefilepl2cpanfile)
into a single interactive pre-upload tool.

Each enabled `App::Project::Doctor::Check::*` plugin receives an
[App::Project::Doctor::Context](https://metacpan.org/pod/App%3A%3AProject%3A%3ADoctor%3A%3AContext) and returns a list of
[App::Project::Doctor::Finding](https://metacpan.org/pod/App%3A%3AProject%3A%3ADoctor%3A%3AFinding) objects which are collected into an
[App::Project::Doctor::Report](https://metacpan.org/pod/App%3A%3AProject%3A%3ADoctor%3A%3AReport).

# CONSTRUCTOR

## new( %args )

### API SPECIFICATION

#### Input

    path    : String    -- start path for root detection    default '.'
    checks  : ArrayRef  -- check name suffixes to run       default all
    skip    : ArrayRef  -- check names to exclude           default []
    verbose : Bool                                          default 0

#### Output

Blessed hashref of type `App::Project::Doctor`.

# ACCESSORS

`path`, `checks`, `skip`, `verbose` -- read-only.

# METHODS

## run

### API SPECIFICATION

#### Input

None.

#### Output

[App::Project::Doctor::Report](https://metacpan.org/pod/App%3A%3AProject%3A%3ADoctor%3A%3AReport).

### MESSAGES

    Code | Trigger                         | Resolution
    -----|----------------------------------|----------------------------------------
    DR01 | Cannot detect distribution root  | Run from within a distribution directory
    DR02 | A check class cannot be loaded   | Install the check's prerequisites

# CHECKS

In default execution order:

    Tests           t/ exists, .t files present, prove passes
    CI              At least one CI configuration present
    GitHubActions   Workflow YAML validates via App::Workflow::Lint
    Meta            META.yml/json parsed and complete
    Pod             All .pm files have valid POD
    Dependencies    Used modules declared as prerequisites
    License         LICENSE file present and consistent with META
    Security        strict/warnings everywhere; no hardcoded secrets



( run in 1.134 second using v1.01-cache-2.11-cpan-b16cb0d3907 )