23 Dec 2014 06:23:49 UTC
- Distribution: App-CPANTS-Lint
- Module version: 0.05
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (2303 / 16 / 0)
- KwaliteeBus factor: 1
- 7.82% Coverage
- License: perl_5
- Perl: v5.8.1
- Activity24 month
- Download (13.88KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionISHIGAKI Kenichi Ishigaki
- SEE ALSO
- COPYRIGHT AND LICENSE
App::CPANTS::Lint - front-end to Module::CPANTS::Analyse
use App::CPANTS::Lint; my $app = App::CPANTS::Lint->new(verbose => 1); $app->lint('path/to/Foo-Dist-1.42.tgz') or print $app->report; # if you need raw data $app->lint('path/to/Foo-Dist-1.42.tgz') or return $app->result; # if you need to look at the details of analysis $app->lint('path/to/Foo-Dist-1.42.tgz'); print Data::Dumper::Dumper($app->stash);
App::CPANTS::Lint is a core of
cpants_lint.plscript to check the Kwalitee of a distribution. See the script for casual usage. You can also use this from other modules for finer control.
Takes an optional hash (which will be passed into Module::CPANTS::Analyse internally) and creates a linter object.
Available options are:
Makes Module::CPANTS::Analyse verbose. False by default.
If true, the
lintmethod (see below) returns true even if
extrametrics (as well as
experimentalmetrics) fail. This may be useful if you only care Kwalitee rankings. False by default.
If true, failed
experimentalmetrics are also reported (via
reportmethod). False by default. Note that
experimentalmetrics are not taken into account while calculating a score.
output_reportmethod writes to a file instead of writing to STDOUT.
- dump, yaml, json
reportmethod returns a formatted dump of the stash (see below).
If you'd like to use extra metrics modules, pass a reference to an array of their parent namespace(s) to search. Metrics modules under Module::CPANTS::Kwalitee namespace are always used.
Takes a path to a distribution tarball and analyses it. Returns true if the distribution has no significant issues (experimental metrics are always ignored). Otherwise, returns false.
Note that the result doesn't always match with what is shown at the CPANTS website, because there are metrics that are only available at the site for various reasons (some of them require database connection, and some are not portable enough).
Returns a report string that contains the details of failed metrics (even if
lintmethod returns true) and a Kwalitee score.
json) is set when you create an App::CPANTS::Lint object,
reportreturns a formatted dump of the stash.
Returns a reference to a hash that contains the details of failed metrics and a Kwalitee score. Internal structure may change without notice, but it always has an "ok" field (which holds a return value of
lintmethod) at least.
Returns a reference to a hash that contains the details of analysis (stored in a stash in Module::CPANTS::Analyse). Internal structure may change without notice, but it always has a "kwalitee" field (which holds a reference to a hash that contains the result of each metric) at least.
Returns a Kwalitee score.
Writes a report to STDOUT (or to a file).
Returns a path to a report file, which should have the same distribution name with a version, plus an extension appropriate to the output format. (eg.
Kenichi Ishigaki, <firstname.lastname@example.org>
This software is copyright (c) 2014 by Kenichi Ishigaki.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install App::CPANTS::Lint, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install App::CPANTS::Lint
For more information on module installation, please visit the detailed CPAN module installation guide.