NAME
App::CriticDB - Manage a database of Perl::Critic violations
VERSION
Version 0.0.1
SYNOPSIS
use App::CriticDB;
my $criticdb=App::CriticDB->new(
...
);
$criticdb->collect(pathspec, ...);
$criticdb->report();
DESCRIPTION
The perlcriticdb tool finds and retains Perl::Critic violations for a large repository of files, permits updates per file, and quick reporting of policy counts without the large runtimes of the main perlcritic command.
STORAGE ENGINES
Violation data can be stored on disk.
File
Perl::Critic violations may be stored in a local file:
my $criticdb=App::CriticDB->new(file=>'violations.stor',type=>'storable');
$criticdb->collect('/path/to/lib');
The type may be:
storable: Storable (default)
dump: Data::Dumper
Note that Data::Dumper files can be useful for debugging purposes but are not recommended for long term use, as they can be 10--30x slower for read/write operations.
REPORTING
By default, report() will send perlcritic formatted violations to standard output.
More information coming soon.
FILE UPDATES
Detecting file updates
More information coming soon.
File deletions
By default, the collector will re-verify the existence of all files at the beginning of each run. Files that no longer exist are removed from the datastore.
TODO
Basic
Version 0.0.1 offers no true functionality, but basic functionality should be available soon.
Storage
DBD::*. Plain file input (such as the lines produced by perlcritic normally).
Reporting
Support named-module hooks that handle each violation. This will be useful for filename remapping, addition of org-specific data, and rerouting to metrics collectors.
Behavior of "OK" files is not currently defined, as the datastore retains violations only.
Commandline tool
The script should support filter/selection similar to `perlcritic`, specifically severity selection and include/exclude. File aggregation may also be useful, but should not be the default. Suppose a --nodelete option to prevent removal of missing files.
BUGS
There may be issues with perlcritic --format, which could affect the parser/collector and the reporting step.
SEE ALSO
AUTHORS
Brian Blackmore (brian@mediaalpha.com).
COPYRIGHT
Copyright (c) 2025--2035, MediaAlpha.com.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License Version 3 as published by the Free Software Foundation.