line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Critic::OptionsProcessor; |
2
|
|
|
|
|
|
|
|
3
|
40
|
|
|
40
|
|
5447
|
use 5.010001; |
|
40
|
|
|
|
|
170
|
|
4
|
40
|
|
|
40
|
|
279
|
use strict; |
|
40
|
|
|
|
|
115
|
|
|
40
|
|
|
|
|
933
|
|
5
|
40
|
|
|
40
|
|
228
|
use warnings; |
|
40
|
|
|
|
|
136
|
|
|
40
|
|
|
|
|
1273
|
|
6
|
|
|
|
|
|
|
|
7
|
40
|
|
|
40
|
|
4147
|
use List::SomeUtils qw(firstval); |
|
40
|
|
|
|
|
91720
|
|
|
40
|
|
|
|
|
2622
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
3359
|
use Perl::Critic::Exception::AggregateConfiguration; |
|
40
|
|
|
|
|
174
|
|
|
40
|
|
|
|
|
1874
|
|
10
|
40
|
|
|
40
|
|
19272
|
use Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter; |
|
40
|
|
|
|
|
170
|
|
|
40
|
|
|
|
|
2250
|
|
11
|
40
|
|
|
|
|
2074
|
use Perl::Critic::Utils qw< |
12
|
|
|
|
|
|
|
:booleans :characters :severities :data_conversion $DEFAULT_VERBOSITY |
13
|
40
|
|
|
40
|
|
349
|
>; |
|
40
|
|
|
|
|
119
|
|
14
|
40
|
|
|
|
|
56732
|
use Perl::Critic::Utils::Constants qw< |
15
|
|
|
|
|
|
|
$PROFILE_STRICTNESS_DEFAULT |
16
|
|
|
|
|
|
|
:color_severity |
17
|
40
|
|
|
40
|
|
17077
|
>; |
|
40
|
|
|
|
|
136
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our $VERSION = '1.150'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub new { |
24
|
449
|
|
|
449
|
1
|
11614
|
my ($class, %args) = @_; |
25
|
449
|
|
|
|
|
1088
|
my $self = bless {}, $class; |
26
|
449
|
|
|
|
|
1560
|
$self->_init( %args ); |
27
|
448
|
|
|
|
|
1686
|
return $self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _init { |
33
|
449
|
|
|
449
|
|
962
|
my ( $self, %args ) = @_; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Multi-value defaults |
36
|
449
|
|
66
|
|
|
1997
|
my $exclude = delete $args{exclude} // $EMPTY; |
37
|
449
|
|
|
|
|
1710
|
$self->{_exclude} = [ words_from_string( $exclude ) ]; |
38
|
|
|
|
|
|
|
|
39
|
449
|
|
66
|
|
|
1789
|
my $include = delete $args{include} // $EMPTY; |
40
|
449
|
|
|
|
|
1180
|
$self->{_include} = [ words_from_string( $include ) ]; |
41
|
|
|
|
|
|
|
|
42
|
449
|
|
66
|
|
|
1682
|
my $program_extensions = delete $args{'program-extensions'} // $EMPTY; |
43
|
449
|
|
|
|
|
1078
|
$self->{_program_extensions} = [ words_from_string( $program_extensions) ]; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# Single-value defaults |
46
|
449
|
|
66
|
|
|
1972
|
$self->{_force} = delete $args{force} // $FALSE; |
47
|
449
|
|
66
|
|
|
1647
|
$self->{_only} = delete $args{only} // $FALSE; |
48
|
|
|
|
|
|
|
$self->{_profile_strictness} = |
49
|
449
|
|
66
|
|
|
2041
|
delete $args{'profile-strictness'} // $PROFILE_STRICTNESS_DEFAULT; |
50
|
449
|
|
66
|
|
|
1696
|
$self->{_single_policy} = delete $args{'single-policy'} // $EMPTY; |
51
|
449
|
|
66
|
|
|
2287
|
$self->{_severity} = delete $args{severity} // $SEVERITY_HIGHEST; |
52
|
449
|
|
66
|
|
|
1712
|
$self->{_theme} = delete $args{theme} // $EMPTY; |
53
|
449
|
|
66
|
|
|
1674
|
$self->{_top} = delete $args{top} // $FALSE; |
54
|
449
|
|
66
|
|
|
1739
|
$self->{_verbose} = delete $args{verbose} // $DEFAULT_VERBOSITY; |
55
|
449
|
|
66
|
|
|
1587
|
$self->{_criticism_fatal} = delete $args{'criticism-fatal'} // $FALSE; |
56
|
449
|
|
66
|
|
|
1647
|
$self->{_pager} = delete $args{pager} // $EMPTY; |
57
|
449
|
|
66
|
|
|
1660
|
$self->{_allow_unsafe} = delete $args{'allow-unsafe'} // $FALSE; |
58
|
|
|
|
|
|
|
|
59
|
2223
|
|
|
2223
|
|
3651
|
$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
|
449
|
|
|
|
|
3204
|
delete $args{'colour-severity-5'}, |
64
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_HIGHEST_DEFAULT, |
65
|
|
|
|
|
|
|
); |
66
|
2223
|
|
|
2223
|
|
3918
|
$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
|
449
|
|
|
|
|
2570
|
delete $args{'colour-severity-4'}, |
71
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_HIGH_DEFAULT, |
72
|
|
|
|
|
|
|
); |
73
|
2223
|
|
|
2223
|
|
3348
|
$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
|
449
|
|
|
|
|
2185
|
delete $args{'colour-severity-3'}, |
78
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_MEDIUM_DEFAULT, |
79
|
|
|
|
|
|
|
); |
80
|
2223
|
|
|
2223
|
|
3241
|
$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
|
449
|
|
|
|
|
2006
|
delete $args{'colour-severity-2'}, |
85
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_LOW_DEFAULT, |
86
|
|
|
|
|
|
|
); |
87
|
2223
|
|
|
2223
|
|
3254
|
$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
|
449
|
|
|
|
|
1893
|
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
|
449
|
50
|
66
|
|
|
1695
|
my $default_color = ($self->pager() or not -t *STDOUT) ? $FALSE : $TRUE; ## no critic (ProhibitInteractiveTest) |
98
|
1341
|
|
|
1341
|
|
2458
|
$self->{_color} = firstval { defined } ( |
99
|
|
|
|
|
|
|
delete $args{color}, |
100
|
|
|
|
|
|
|
delete $args{colour}, |
101
|
449
|
|
|
|
|
2977
|
$default_color |
102
|
|
|
|
|
|
|
); |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
# If there's anything left, complain. |
105
|
449
|
|
|
|
|
2027
|
_check_for_extra_options(%args); |
106
|
|
|
|
|
|
|
|
107
|
448
|
|
|
|
|
995
|
return $self; |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub _check_for_extra_options { |
113
|
449
|
|
|
449
|
|
1030
|
my %args = @_; |
114
|
|
|
|
|
|
|
|
115
|
449
|
100
|
|
|
|
1765
|
if ( my @remaining = sort keys %args ){ |
116
|
1
|
|
|
|
|
14
|
my $errors = Perl::Critic::Exception::AggregateConfiguration->new(); |
117
|
|
|
|
|
|
|
|
118
|
1
|
|
|
|
|
955
|
foreach my $option_name (@remaining) { |
119
|
2
|
|
|
|
|
32
|
$errors->add_exception( |
120
|
|
|
|
|
|
|
Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter->new( |
121
|
|
|
|
|
|
|
option_name => $option_name, |
122
|
|
|
|
|
|
|
) |
123
|
|
|
|
|
|
|
) |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
1
|
|
|
|
|
8
|
$errors->rethrow(); |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
448
|
|
|
|
|
1036
|
return; |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
133
|
|
|
|
|
|
|
# Public ACCESSOR methods |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
sub severity { |
136
|
214
|
|
|
214
|
1
|
445
|
my ($self) = @_; |
137
|
214
|
|
|
|
|
602
|
return $self->{_severity}; |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
sub theme { |
143
|
229
|
|
|
229
|
1
|
462
|
my ($self) = @_; |
144
|
229
|
|
|
|
|
645
|
return $self->{_theme}; |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
sub exclude { |
150
|
281
|
|
|
281
|
1
|
730
|
my ($self) = @_; |
151
|
281
|
|
|
|
|
993
|
return $self->{_exclude}; |
152
|
|
|
|
|
|
|
} |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
sub include { |
157
|
281
|
|
|
281
|
1
|
699
|
my ($self) = @_; |
158
|
281
|
|
|
|
|
1164
|
return $self->{_include}; |
159
|
|
|
|
|
|
|
} |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
sub only { |
164
|
275
|
|
|
275
|
1
|
571
|
my ($self) = @_; |
165
|
275
|
|
|
|
|
1029
|
return $self->{_only}; |
166
|
|
|
|
|
|
|
} |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
sub profile_strictness { |
171
|
279
|
|
|
279
|
1
|
661
|
my ($self) = @_; |
172
|
279
|
|
|
|
|
905
|
return $self->{_profile_strictness}; |
173
|
|
|
|
|
|
|
} |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
sub single_policy { |
178
|
279
|
|
|
279
|
1
|
651
|
my ($self) = @_; |
179
|
279
|
|
|
|
|
997
|
return $self->{_single_policy}; |
180
|
|
|
|
|
|
|
} |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
sub verbose { |
185
|
281
|
|
|
281
|
1
|
827
|
my ($self) = @_; |
186
|
281
|
|
|
|
|
885
|
return $self->{_verbose}; |
187
|
|
|
|
|
|
|
} |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
sub color { |
192
|
282
|
|
|
282
|
1
|
743
|
my ($self) = @_; |
193
|
282
|
|
|
|
|
955
|
return $self->{_color}; |
194
|
|
|
|
|
|
|
} |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
sub pager { |
199
|
730
|
|
|
730
|
1
|
1504
|
my ($self) = @_; |
200
|
730
|
|
|
|
|
6429
|
return $self->{_pager}; |
201
|
|
|
|
|
|
|
} |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
sub allow_unsafe { |
206
|
275
|
|
|
275
|
1
|
521
|
my ($self) = @_; |
207
|
275
|
|
|
|
|
985
|
return $self->{_allow_unsafe}; |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
sub criticism_fatal { |
213
|
279
|
|
|
279
|
1
|
606
|
my ($self) = @_; |
214
|
279
|
|
|
|
|
917
|
return $self->{_criticism_fatal}; |
215
|
|
|
|
|
|
|
} |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
sub force { |
220
|
275
|
|
|
275
|
1
|
651
|
my ($self) = @_; |
221
|
275
|
|
|
|
|
1121
|
return $self->{_force}; |
222
|
|
|
|
|
|
|
} |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
sub top { |
227
|
279
|
|
|
279
|
1
|
559
|
my ($self) = @_; |
228
|
279
|
|
|
|
|
759
|
return $self->{_top}; |
229
|
|
|
|
|
|
|
} |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
sub color_severity_highest { |
234
|
284
|
|
|
284
|
1
|
730
|
my ($self) = @_; |
235
|
284
|
|
|
|
|
1200
|
return $self->{_color_severity_highest}; |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
sub color_severity_high { |
241
|
284
|
|
|
284
|
1
|
731
|
my ($self) = @_; |
242
|
284
|
|
|
|
|
1050
|
return $self->{_color_severity_high}; |
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
sub color_severity_medium { |
248
|
284
|
|
|
284
|
1
|
710
|
my ($self) = @_; |
249
|
284
|
|
|
|
|
1038
|
return $self->{_color_severity_medium}; |
250
|
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
sub color_severity_low { |
255
|
284
|
|
|
284
|
1
|
651
|
my ($self) = @_; |
256
|
284
|
|
|
|
|
1034
|
return $self->{_color_severity_low}; |
257
|
|
|
|
|
|
|
} |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
sub color_severity_lowest { |
262
|
284
|
|
|
284
|
1
|
672
|
my ($self) = @_; |
263
|
284
|
|
|
|
|
962
|
return $self->{_color_severity_lowest}; |
264
|
|
|
|
|
|
|
} |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
sub program_extensions { |
269
|
281
|
|
|
281
|
1
|
652
|
my ($self) = @_; |
270
|
281
|
|
|
|
|
623
|
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 : |