-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
62 lines (39 loc) · 1.79 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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::ProhibitExcessComplexity
but 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
INSTALLATION
To install this module, run the following commands:
perl Build.PL
./Build
./Build test
./Build install
SUPPORT AND DOCUMENTATION
Each policy has its own detailed documentation.
BUG REPORTS
Please report bugs on GitHub.
The source code repository can be found at [https://github.com/mardem1/perl-critic-mardem](https://github.com/mardem1/perl-critic-mardem)
AUTHOR
Markus Demml, [email protected]
LICENSE AND COPYRIGHT
Copyright (c) 2022, 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.