Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mardem1/perl-critic-mardem
Perl-Critic Policies for simple Refactoring-Support
https://github.com/mardem1/perl-critic-mardem
perl perl-critic perl5 static-analysis static-analysis-plugin static-code-analysis
Last synced: about 1 month ago
JSON representation
Perl-Critic Policies for simple Refactoring-Support
- Host: GitHub
- URL: https://github.com/mardem1/perl-critic-mardem
- Owner: mardem1
- License: other
- Created: 2022-04-30T19:23:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T10:20:54.000Z (6 months ago)
- Last Synced: 2024-09-29T19:01:34.918Z (about 2 months ago)
- Topics: perl, perl-critic, perl5, static-analysis, static-analysis-plugin, static-code-analysis
- Language: Perl
- Homepage:
- Size: 420 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
Perl-Critic-Mardem
DESCRIPTION
Perl-Critic Policies for simple and isolated Refactoring-Support.
This Perl-Crictic Policy-Modules should help where to start a safe
refactoring in old leagacy Perl code.The McCabe complexity check within the standard Perl-Critic Module are a good
overall starting point see:* Perl::Critic::Policy::Modules::ProhibitExcessMainComplexity
* Perl::Critic::Policy::Subroutines::ProhibitExcessComplexitybut these are for some bigger scans, so these new policies should check (or begin) in smaller chunks:
* ProhibitReturnBooleanAsInt - return boolean as int "return 1;"
* ProhibitConditionComplexity - condition complexity "if/while/for/... (...){}"
* ProhibitManyConditionsInSub - subs has many conditionals "if, while, for, ..."
* ProhibitLargeBlock - large code block as statement count "{...}"
* ProhibitBlockComplexity - code block complexity "{...}"
* ProhibitLargeSub - large subs as statement count
* ProhibitLargeFile - large files as line count
* ProhibitFileSize - large files as byte or char countINSTALLATION
To install this module via CAPN, run the following commands:
> cpanm Perl::Critic::Mardem
To install this module from source, run the following commands:
> perl Build.PL
> ./Build
> ./Build test
> ./Build installSUPPORT AND DOCUMENTATION
Each policy has its own detailed documentation see
Perl::Critic::Mardem (https://metacpan.org/pod/Perl::Critic::Mardem) on MetaCPAN.BUG REPORTS
Please report bugs as GitHub-Issue https://github.com/mardem1/perl-critic-mardem/issues
The source code repository can be found at GitHub https://github.com/mardem1/perl-critic-mardem
CHANGELOG
see Changes
AUTHOR
Markus Demml, [email protected]
LICENSE AND COPYRIGHT
Copyright (c) 2024, Markus Demml
This library is free software; you can redistribute it and/or modify it
under the same terms as the Perl 5 programming language system itself.
The full text of this license can be found in the LICENSE file included
with this module.DISCLAIMER
This package is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.