I need to implement lint and Perl::Critic for static code analysis in Perl. I have found B::Lint module for lint in Perl.
- Is it really required to use both the modules for static code analysis?
- If yes, then how these two modules work together?
I need to implement lint and Perl::Critic for static code analysis in Perl. I have found B::Lint module for lint in Perl.
B::Lint and Perl::Critic are separate modules.
It is not required to use both modules, but it is useful to use both.
I created a wrapper script for myself to run both in sequence. For example, to analyze a single Perl source code file (file.pl
):
perlcritic --brutal --verbose 9 file.pl
perl -MO=Lint file.pl