| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Perl::Critic::OptionsProcessor; |
|
2
|
|
|
|
|
|
|
|
|
3
|
40
|
|
|
40
|
|
10809
|
use 5.010001; |
|
|
40
|
|
|
|
|
133
|
|
|
4
|
40
|
|
|
40
|
|
185
|
use strict; |
|
|
40
|
|
|
|
|
71
|
|
|
|
40
|
|
|
|
|
721
|
|
|
5
|
40
|
|
|
40
|
|
139
|
use warnings; |
|
|
40
|
|
|
|
|
67
|
|
|
|
40
|
|
|
|
|
1741
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
40
|
|
|
40
|
|
3903
|
use List::SomeUtils qw(firstval); |
|
|
40
|
|
|
|
|
89361
|
|
|
|
40
|
|
|
|
|
2486
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
3444
|
use Perl::Critic::Exception::AggregateConfiguration; |
|
|
40
|
|
|
|
|
95
|
|
|
|
40
|
|
|
|
|
1606
|
|
|
10
|
40
|
|
|
40
|
|
16757
|
use Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter; |
|
|
40
|
|
|
|
|
105
|
|
|
|
40
|
|
|
|
|
2129
|
|
|
11
|
40
|
|
|
|
|
2088
|
use Perl::Critic::Utils qw< |
|
12
|
|
|
|
|
|
|
:booleans :characters :severities :data_conversion $DEFAULT_VERBOSITY |
|
13
|
40
|
|
|
40
|
|
228
|
>; |
|
|
40
|
|
|
|
|
65
|
|
|
14
|
40
|
|
|
|
|
42957
|
use Perl::Critic::Utils::Constants qw< |
|
15
|
|
|
|
|
|
|
$PROFILE_STRICTNESS_DEFAULT |
|
16
|
|
|
|
|
|
|
:color_severity |
|
17
|
40
|
|
|
40
|
|
13813
|
>; |
|
|
40
|
|
|
|
|
83
|
|
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our $VERSION = '1.156'; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub new { |
|
24
|
450
|
|
|
450
|
1
|
9618
|
my ($class, %args) = @_; |
|
25
|
450
|
|
|
|
|
847
|
my $self = bless {}, $class; |
|
26
|
450
|
|
|
|
|
1438
|
$self->_init( %args ); |
|
27
|
449
|
|
|
|
|
1273
|
return $self; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _init { |
|
33
|
450
|
|
|
450
|
|
808
|
my ( $self, %args ) = @_; |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Multi-value defaults |
|
36
|
450
|
|
66
|
|
|
1685
|
my $exclude = delete $args{exclude} // $EMPTY; |
|
37
|
450
|
|
|
|
|
1452
|
$self->{_exclude} = [ words_from_string( $exclude ) ]; |
|
38
|
|
|
|
|
|
|
|
|
39
|
450
|
|
66
|
|
|
1527
|
my $include = delete $args{include} // $EMPTY; |
|
40
|
450
|
|
|
|
|
898
|
$self->{_include} = [ words_from_string( $include ) ]; |
|
41
|
|
|
|
|
|
|
|
|
42
|
450
|
|
66
|
|
|
1412
|
my $program_extensions = delete $args{'program-extensions'} // $EMPTY; |
|
43
|
450
|
|
|
|
|
855
|
$self->{_program_extensions} = [ words_from_string( $program_extensions) ]; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# Single-value defaults |
|
46
|
450
|
|
66
|
|
|
1683
|
$self->{_force} = delete $args{force} // $FALSE; |
|
47
|
450
|
|
66
|
|
|
1463
|
$self->{_only} = delete $args{only} // $FALSE; |
|
48
|
|
|
|
|
|
|
$self->{_profile_strictness} = |
|
49
|
450
|
|
66
|
|
|
1905
|
delete $args{'profile-strictness'} // $PROFILE_STRICTNESS_DEFAULT; |
|
50
|
450
|
|
66
|
|
|
1600
|
$self->{_single_policy} = delete $args{'single-policy'} // $EMPTY; |
|
51
|
450
|
|
66
|
|
|
1566
|
$self->{_severity} = delete $args{severity} // $SEVERITY_HIGHEST; |
|
52
|
450
|
|
66
|
|
|
1566
|
$self->{_theme} = delete $args{theme} // $EMPTY; |
|
53
|
450
|
|
66
|
|
|
1373
|
$self->{_top} = delete $args{top} // $FALSE; |
|
54
|
450
|
|
66
|
|
|
1574
|
$self->{_verbose} = delete $args{verbose} // $DEFAULT_VERBOSITY; |
|
55
|
450
|
|
66
|
|
|
1425
|
$self->{_criticism_fatal} = delete $args{'criticism-fatal'} // $FALSE; |
|
56
|
450
|
|
66
|
|
|
1729
|
$self->{_pager} = delete $args{pager} // $EMPTY; |
|
57
|
450
|
|
66
|
|
|
1516
|
$self->{_allow_unsafe} = delete $args{'allow-unsafe'} // $FALSE; |
|
58
|
|
|
|
|
|
|
|
|
59
|
2228
|
|
|
2228
|
|
2958
|
$self->{_color_severity_highest} = firstval { defined } ( |
|
60
|
|
|
|
|
|
|
delete $args{'color-severity-highest'}, |
|
61
|
|
|
|
|
|
|
delete $args{'colour-severity-highest'}, |
|
62
|
|
|
|
|
|
|
delete $args{'color-severity-5'}, |
|
63
|
450
|
|
|
|
|
3244
|
delete $args{'colour-severity-5'}, |
|
64
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_HIGHEST_DEFAULT, |
|
65
|
|
|
|
|
|
|
); |
|
66
|
2228
|
|
|
2228
|
|
2549
|
$self->{_color_severity_high} = firstval { defined } ( |
|
67
|
|
|
|
|
|
|
delete $args{'color-severity-high'}, |
|
68
|
|
|
|
|
|
|
delete $args{'colour-severity-high'}, |
|
69
|
|
|
|
|
|
|
delete $args{'color-severity-4'}, |
|
70
|
450
|
|
|
|
|
2367
|
delete $args{'colour-severity-4'}, |
|
71
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_HIGH_DEFAULT, |
|
72
|
|
|
|
|
|
|
); |
|
73
|
2228
|
|
|
2228
|
|
2565
|
$self->{_color_severity_medium} = firstval { defined } ( |
|
74
|
|
|
|
|
|
|
delete $args{'color-severity-medium'}, |
|
75
|
|
|
|
|
|
|
delete $args{'colour-severity-medium'}, |
|
76
|
|
|
|
|
|
|
delete $args{'color-severity-3'}, |
|
77
|
450
|
|
|
|
|
1652
|
delete $args{'colour-severity-3'}, |
|
78
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_MEDIUM_DEFAULT, |
|
79
|
|
|
|
|
|
|
); |
|
80
|
2228
|
|
|
2228
|
|
2749
|
$self->{_color_severity_low} = firstval { defined } ( |
|
81
|
|
|
|
|
|
|
delete $args{'color-severity-low'}, |
|
82
|
|
|
|
|
|
|
delete $args{'colour-severity-low'}, |
|
83
|
|
|
|
|
|
|
delete $args{'color-severity-2'}, |
|
84
|
450
|
|
|
|
|
1606
|
delete $args{'colour-severity-2'}, |
|
85
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_LOW_DEFAULT, |
|
86
|
|
|
|
|
|
|
); |
|
87
|
2228
|
|
|
2228
|
|
2482
|
$self->{_color_severity_lowest} = firstval { defined } ( |
|
88
|
|
|
|
|
|
|
delete $args{'color-severity-lowest'}, |
|
89
|
|
|
|
|
|
|
delete $args{'colour-severity-lowest'}, |
|
90
|
|
|
|
|
|
|
delete $args{'color-severity-1'}, |
|
91
|
450
|
|
|
|
|
1501
|
delete $args{'colour-severity-1'}, |
|
92
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_LOWEST_DEFAULT, |
|
93
|
|
|
|
|
|
|
); |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
# If we're using a pager or not outputting to a tty don't use colors. |
|
96
|
|
|
|
|
|
|
# Can't use IO::Interactive here because we /don't/ want to check STDIN. |
|
97
|
450
|
50
|
66
|
|
|
1456
|
my $default_color = ($self->pager() or not -t *STDOUT) ? $FALSE : $TRUE; ## no critic (ProhibitInteractiveTest) |
|
98
|
1344
|
|
|
1344
|
|
1839
|
$self->{_color} = firstval { defined } ( |
|
99
|
|
|
|
|
|
|
delete $args{color}, |
|
100
|
|
|
|
|
|
|
delete $args{colour}, |
|
101
|
450
|
|
|
|
|
1758
|
$default_color |
|
102
|
|
|
|
|
|
|
); |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
# If there's anything left, complain. |
|
105
|
450
|
|
|
|
|
1486
|
_check_for_extra_options(%args); |
|
106
|
|
|
|
|
|
|
|
|
107
|
449
|
|
|
|
|
829
|
return $self; |
|
108
|
|
|
|
|
|
|
} |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub _check_for_extra_options { |
|
113
|
450
|
|
|
450
|
|
793
|
my %args = @_; |
|
114
|
|
|
|
|
|
|
|
|
115
|
450
|
100
|
|
|
|
1417
|
if ( my @remaining = sort keys %args ){ |
|
116
|
1
|
|
|
|
|
15
|
my $errors = Perl::Critic::Exception::AggregateConfiguration->new(); |
|
117
|
|
|
|
|
|
|
|
|
118
|
1
|
|
|
|
|
682
|
foreach my $option_name (@remaining) { |
|
119
|
2
|
|
|
|
|
24
|
$errors->add_exception( |
|
120
|
|
|
|
|
|
|
Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter->new( |
|
121
|
|
|
|
|
|
|
option_name => $option_name, |
|
122
|
|
|
|
|
|
|
) |
|
123
|
|
|
|
|
|
|
) |
|
124
|
|
|
|
|
|
|
} |
|
125
|
|
|
|
|
|
|
|
|
126
|
1
|
|
|
|
|
6
|
$errors->rethrow(); |
|
127
|
|
|
|
|
|
|
} |
|
128
|
|
|
|
|
|
|
|
|
129
|
449
|
|
|
|
|
872
|
return; |
|
130
|
|
|
|
|
|
|
} |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
133
|
|
|
|
|
|
|
# Public ACCESSOR methods |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
sub severity { |
|
136
|
214
|
|
|
214
|
1
|
373
|
my ($self) = @_; |
|
137
|
214
|
|
|
|
|
500
|
return $self->{_severity}; |
|
138
|
|
|
|
|
|
|
} |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
sub theme { |
|
143
|
230
|
|
|
230
|
1
|
394
|
my ($self) = @_; |
|
144
|
230
|
|
|
|
|
591
|
return $self->{_theme}; |
|
145
|
|
|
|
|
|
|
} |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
sub exclude { |
|
150
|
282
|
|
|
282
|
1
|
597
|
my ($self) = @_; |
|
151
|
282
|
|
|
|
|
802
|
return $self->{_exclude}; |
|
152
|
|
|
|
|
|
|
} |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
sub include { |
|
157
|
282
|
|
|
282
|
1
|
605
|
my ($self) = @_; |
|
158
|
282
|
|
|
|
|
1056
|
return $self->{_include}; |
|
159
|
|
|
|
|
|
|
} |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
sub only { |
|
164
|
276
|
|
|
276
|
1
|
525
|
my ($self) = @_; |
|
165
|
276
|
|
|
|
|
745
|
return $self->{_only}; |
|
166
|
|
|
|
|
|
|
} |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
sub profile_strictness { |
|
171
|
280
|
|
|
280
|
1
|
527
|
my ($self) = @_; |
|
172
|
280
|
|
|
|
|
710
|
return $self->{_profile_strictness}; |
|
173
|
|
|
|
|
|
|
} |
|
174
|
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
176
|
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
sub single_policy { |
|
178
|
280
|
|
|
280
|
1
|
506
|
my ($self) = @_; |
|
179
|
280
|
|
|
|
|
868
|
return $self->{_single_policy}; |
|
180
|
|
|
|
|
|
|
} |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
sub verbose { |
|
185
|
282
|
|
|
282
|
1
|
538
|
my ($self) = @_; |
|
186
|
282
|
|
|
|
|
709
|
return $self->{_verbose}; |
|
187
|
|
|
|
|
|
|
} |
|
188
|
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
190
|
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
sub color { |
|
192
|
283
|
|
|
283
|
1
|
1708
|
my ($self) = @_; |
|
193
|
283
|
|
|
|
|
811
|
return $self->{_color}; |
|
194
|
|
|
|
|
|
|
} |
|
195
|
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
197
|
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
sub pager { |
|
199
|
732
|
|
|
732
|
1
|
1164
|
my ($self) = @_; |
|
200
|
732
|
|
|
|
|
5370
|
return $self->{_pager}; |
|
201
|
|
|
|
|
|
|
} |
|
202
|
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
204
|
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
sub allow_unsafe { |
|
206
|
276
|
|
|
276
|
1
|
501
|
my ($self) = @_; |
|
207
|
276
|
|
|
|
|
767
|
return $self->{_allow_unsafe}; |
|
208
|
|
|
|
|
|
|
} |
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
211
|
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
sub criticism_fatal { |
|
213
|
280
|
|
|
280
|
1
|
487
|
my ($self) = @_; |
|
214
|
280
|
|
|
|
|
728
|
return $self->{_criticism_fatal}; |
|
215
|
|
|
|
|
|
|
} |
|
216
|
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
218
|
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
sub force { |
|
220
|
276
|
|
|
276
|
1
|
533
|
my ($self) = @_; |
|
221
|
276
|
|
|
|
|
1040
|
return $self->{_force}; |
|
222
|
|
|
|
|
|
|
} |
|
223
|
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
225
|
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
sub top { |
|
227
|
280
|
|
|
280
|
1
|
575
|
my ($self) = @_; |
|
228
|
280
|
|
|
|
|
685
|
return $self->{_top}; |
|
229
|
|
|
|
|
|
|
} |
|
230
|
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
232
|
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
sub color_severity_highest { |
|
234
|
285
|
|
|
285
|
1
|
575
|
my ($self) = @_; |
|
235
|
285
|
|
|
|
|
1143
|
return $self->{_color_severity_highest}; |
|
236
|
|
|
|
|
|
|
} |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
239
|
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
sub color_severity_high { |
|
241
|
285
|
|
|
285
|
1
|
608
|
my ($self) = @_; |
|
242
|
285
|
|
|
|
|
1084
|
return $self->{_color_severity_high}; |
|
243
|
|
|
|
|
|
|
} |
|
244
|
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
246
|
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
sub color_severity_medium { |
|
248
|
285
|
|
|
285
|
1
|
641
|
my ($self) = @_; |
|
249
|
285
|
|
|
|
|
880
|
return $self->{_color_severity_medium}; |
|
250
|
|
|
|
|
|
|
} |
|
251
|
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
253
|
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
sub color_severity_low { |
|
255
|
285
|
|
|
285
|
1
|
594
|
my ($self) = @_; |
|
256
|
285
|
|
|
|
|
884
|
return $self->{_color_severity_low}; |
|
257
|
|
|
|
|
|
|
} |
|
258
|
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
260
|
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
sub color_severity_lowest { |
|
262
|
285
|
|
|
285
|
1
|
525
|
my ($self) = @_; |
|
263
|
285
|
|
|
|
|
854
|
return $self->{_color_severity_lowest}; |
|
264
|
|
|
|
|
|
|
} |
|
265
|
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
267
|
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
sub program_extensions { |
|
269
|
282
|
|
|
282
|
1
|
527
|
my ($self) = @_; |
|
270
|
282
|
|
|
|
|
519
|
return $self->{_program_extensions}; |
|
271
|
|
|
|
|
|
|
} |
|
272
|
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
274
|
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
1; |
|
276
|
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
__END__ |
|
278
|
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
|
280
|
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
=pod |
|
282
|
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
=head1 NAME |
|
284
|
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
Perl::Critic::OptionsProcessor - The global configuration default values, combined with command-line values. |
|
286
|
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
289
|
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
This is a helper class that encapsulates the default parameters for |
|
291
|
|
|
|
|
|
|
constructing a L<Perl::Critic::Config|Perl::Critic::Config> object. |
|
292
|
|
|
|
|
|
|
There are no user-serviceable parts here. |
|
293
|
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
=head1 INTERFACE SUPPORT |
|
296
|
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
This is considered to be a non-public class. Its interface is subject |
|
298
|
|
|
|
|
|
|
to change without notice. |
|
299
|
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
|
302
|
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
=over |
|
304
|
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
=item C< new( %DEFAULT_PARAMS ) > |
|
306
|
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
Returns a reference to a new C<Perl::Critic::OptionsProcessor> object. |
|
308
|
|
|
|
|
|
|
You can override the coded defaults by passing in name-value pairs |
|
309
|
|
|
|
|
|
|
that correspond to the methods listed below. |
|
310
|
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
This is usually only invoked by |
|
312
|
|
|
|
|
|
|
L<Perl::Critic::UserProfile|Perl::Critic::UserProfile>, which passes |
|
313
|
|
|
|
|
|
|
in the global values from a F<.perlcriticrc> file. This object |
|
314
|
|
|
|
|
|
|
contains no information for individual Policies. |
|
315
|
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
=back |
|
317
|
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
=head1 METHODS |
|
319
|
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
=over |
|
321
|
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
=item C< exclude() > |
|
323
|
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
Returns a reference to a list of the default exclusion patterns. If |
|
325
|
|
|
|
|
|
|
onto by |
|
326
|
|
|
|
|
|
|
L<Perl::Critic::PolicyParameter|Perl::Critic::PolicyParameter>. there |
|
327
|
|
|
|
|
|
|
are no default exclusion patterns, then the list will be empty. |
|
328
|
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
=item C< force() > |
|
331
|
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
Returns the default value of the C<force> flag (Either 1 or 0). |
|
333
|
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
=item C< include() > |
|
336
|
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
Returns a reference to a list of the default inclusion patterns. If |
|
338
|
|
|
|
|
|
|
there are no default exclusion patterns, then the list will be empty. |
|
339
|
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
=item C< only() > |
|
342
|
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
Returns the default value of the C<only> flag (Either 1 or 0). |
|
344
|
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
=item C< profile_strictness() > |
|
347
|
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
Returns the default value of C<profile_strictness> as an unvalidated |
|
349
|
|
|
|
|
|
|
string. |
|
350
|
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
=item C< single_policy() > |
|
353
|
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
Returns the default C<single-policy> pattern. (As a string.) |
|
355
|
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
=item C< severity() > |
|
358
|
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
Returns the default C<severity> setting. (1..5). |
|
360
|
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
=item C< theme() > |
|
363
|
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
Returns the default C<theme> setting. (As a string). |
|
365
|
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
=item C< top() > |
|
368
|
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
Returns the default C<top> setting. (Either 0 or a positive integer). |
|
370
|
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
=item C< verbose() > |
|
373
|
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
Returns the default C<verbose> setting. (Either a number or format |
|
375
|
|
|
|
|
|
|
string). |
|
376
|
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
=item C< color() > |
|
379
|
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
Returns the default C<color> setting. (Either 1 or 0). |
|
381
|
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
=item C< pager() > |
|
384
|
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
Returns the default C<pager> setting. (Either empty string or the pager |
|
386
|
|
|
|
|
|
|
command string). |
|
387
|
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
=item C< allow_unsafe() > |
|
390
|
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
Returns the default C<allow-unsafe> setting. (Either 1 or 0). |
|
392
|
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
=item C< criticism_fatal() > |
|
395
|
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
Returns the default C<criticism-fatal> setting (Either 1 or 0). |
|
397
|
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
=item C< color_severity_highest() > |
|
399
|
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
Returns the color to be used for coloring highest severity violations. |
|
401
|
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
=item C< color_severity_high() > |
|
403
|
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
Returns the color to be used for coloring high severity violations. |
|
405
|
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
=item C< color_severity_medium() > |
|
407
|
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
Returns the color to be used for coloring medium severity violations. |
|
409
|
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
=item C< color_severity_low() > |
|
411
|
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
Returns the color to be used for coloring low severity violations. |
|
413
|
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
=item C< color_severity_lowest() > |
|
415
|
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
Returns the color to be used for coloring lowest severity violations. |
|
417
|
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
=item C< program_extensions() > |
|
419
|
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
Returns a reference to the array of file name extensions to be interpreted as |
|
421
|
|
|
|
|
|
|
representing Perl programs. |
|
422
|
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
=back |
|
424
|
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
427
|
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
L<Perl::Critic::Config|Perl::Critic::Config>, |
|
429
|
|
|
|
|
|
|
L<Perl::Critic::UserProfile|Perl::Critic::UserProfile> |
|
430
|
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
=head1 AUTHOR |
|
433
|
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> |
|
435
|
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
438
|
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
Copyright (c) 2005-2023 Imaginative Software Systems |
|
440
|
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
|
442
|
|
|
|
|
|
|
it under the same terms as Perl itself. The full text of this license |
|
443
|
|
|
|
|
|
|
can be found in the LICENSE file included with this module. |
|
444
|
|
|
|
|
|
|
|
|
445
|
|
|
|
|
|
|
=cut |
|
446
|
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
# Local Variables: |
|
448
|
|
|
|
|
|
|
# mode: cperl |
|
449
|
|
|
|
|
|
|
# cperl-indent-level: 4 |
|
450
|
|
|
|
|
|
|
# fill-column: 78 |
|
451
|
|
|
|
|
|
|
# indent-tabs-mode: nil |
|
452
|
|
|
|
|
|
|
# c-indentation-style: bsd |
|
453
|
|
|
|
|
|
|
# End: |
|
454
|
|
|
|
|
|
|
# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround : |