line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Critic::OptionsProcessor; |
2
|
|
|
|
|
|
|
|
3
|
40
|
|
|
40
|
|
5722
|
use 5.010001; |
|
40
|
|
|
|
|
199
|
|
4
|
40
|
|
|
40
|
|
313
|
use strict; |
|
40
|
|
|
|
|
105
|
|
|
40
|
|
|
|
|
937
|
|
5
|
40
|
|
|
40
|
|
252
|
use warnings; |
|
40
|
|
|
|
|
114
|
|
|
40
|
|
|
|
|
1296
|
|
6
|
|
|
|
|
|
|
|
7
|
40
|
|
|
40
|
|
242
|
use English qw(-no_match_vars); |
|
40
|
|
|
|
|
108
|
|
|
40
|
|
|
|
|
294
|
|
8
|
40
|
|
|
40
|
|
18538
|
use List::SomeUtils qw(firstval); |
|
40
|
|
|
|
|
94967
|
|
|
40
|
|
|
|
|
2428
|
|
9
|
|
|
|
|
|
|
|
10
|
40
|
|
|
40
|
|
3620
|
use Perl::Critic::Exception::AggregateConfiguration; |
|
40
|
|
|
|
|
119
|
|
|
40
|
|
|
|
|
1789
|
|
11
|
40
|
|
|
40
|
|
20254
|
use Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter; |
|
40
|
|
|
|
|
137
|
|
|
40
|
|
|
|
|
2604
|
|
12
|
40
|
|
|
|
|
2021
|
use Perl::Critic::Utils qw< |
13
|
|
|
|
|
|
|
:booleans :characters :severities :data_conversion $DEFAULT_VERBOSITY |
14
|
40
|
|
|
40
|
|
335
|
>; |
|
40
|
|
|
|
|
138
|
|
15
|
40
|
|
|
|
|
58727
|
use Perl::Critic::Utils::Constants qw< |
16
|
|
|
|
|
|
|
$PROFILE_STRICTNESS_DEFAULT |
17
|
|
|
|
|
|
|
:color_severity |
18
|
40
|
|
|
40
|
|
16826
|
>; |
|
40
|
|
|
|
|
134
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '1.148'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub new { |
25
|
3091
|
|
|
3091
|
1
|
18876
|
my ($class, %args) = @_; |
26
|
3091
|
|
|
|
|
6284
|
my $self = bless {}, $class; |
27
|
3091
|
|
|
|
|
10619
|
$self->_init( %args ); |
28
|
3090
|
|
|
|
|
11280
|
return $self; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _init { |
34
|
3091
|
|
|
3091
|
|
6451
|
my ( $self, %args ) = @_; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# Multi-value defaults |
37
|
3091
|
|
66
|
|
|
12397
|
my $exclude = delete $args{exclude} // $EMPTY; |
38
|
3091
|
|
|
|
|
11819
|
$self->{_exclude} = [ words_from_string( $exclude ) ]; |
39
|
|
|
|
|
|
|
|
40
|
3091
|
|
66
|
|
|
12587
|
my $include = delete $args{include} // $EMPTY; |
41
|
3091
|
|
|
|
|
7096
|
$self->{_include} = [ words_from_string( $include ) ]; |
42
|
|
|
|
|
|
|
|
43
|
3091
|
|
66
|
|
|
12962
|
my $program_extensions = delete $args{'program-extensions'} // $EMPTY; |
44
|
3091
|
|
|
|
|
7864
|
$self->{_program_extensions} = [ words_from_string( $program_extensions) ]; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# Single-value defaults |
47
|
3091
|
|
66
|
|
|
13672
|
$self->{_force} = delete $args{force} // $FALSE; |
48
|
3091
|
|
66
|
|
|
12027
|
$self->{_only} = delete $args{only} // $FALSE; |
49
|
|
|
|
|
|
|
$self->{_profile_strictness} = |
50
|
3091
|
|
66
|
|
|
13953
|
delete $args{'profile-strictness'} // $PROFILE_STRICTNESS_DEFAULT; |
51
|
3091
|
|
66
|
|
|
11278
|
$self->{_single_policy} = delete $args{'single-policy'} // $EMPTY; |
52
|
3091
|
|
66
|
|
|
15456
|
$self->{_severity} = delete $args{severity} // $SEVERITY_HIGHEST; |
53
|
3091
|
|
66
|
|
|
11092
|
$self->{_theme} = delete $args{theme} // $EMPTY; |
54
|
3091
|
|
66
|
|
|
11591
|
$self->{_top} = delete $args{top} // $FALSE; |
55
|
3091
|
|
66
|
|
|
13598
|
$self->{_verbose} = delete $args{verbose} // $DEFAULT_VERBOSITY; |
56
|
3091
|
|
66
|
|
|
10841
|
$self->{_criticism_fatal} = delete $args{'criticism-fatal'} // $FALSE; |
57
|
3091
|
|
66
|
|
|
10060
|
$self->{_pager} = delete $args{pager} // $EMPTY; |
58
|
3091
|
|
66
|
|
|
10865
|
$self->{_allow_unsafe} = delete $args{'allow-unsafe'} // $FALSE; |
59
|
|
|
|
|
|
|
|
60
|
15433
|
|
|
15433
|
|
26000
|
$self->{_color_severity_highest} = firstval { defined } ( |
61
|
|
|
|
|
|
|
delete $args{'color-severity-highest'}, |
62
|
|
|
|
|
|
|
delete $args{'colour-severity-highest'}, |
63
|
|
|
|
|
|
|
delete $args{'color-severity-5'}, |
64
|
3091
|
|
|
|
|
20200
|
delete $args{'colour-severity-5'}, |
65
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_HIGHEST_DEFAULT, |
66
|
|
|
|
|
|
|
); |
67
|
15433
|
|
|
15433
|
|
25951
|
$self->{_color_severity_high} = firstval { defined } ( |
68
|
|
|
|
|
|
|
delete $args{'color-severity-high'}, |
69
|
|
|
|
|
|
|
delete $args{'colour-severity-high'}, |
70
|
|
|
|
|
|
|
delete $args{'color-severity-4'}, |
71
|
3091
|
|
|
|
|
17846
|
delete $args{'colour-severity-4'}, |
72
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_HIGH_DEFAULT, |
73
|
|
|
|
|
|
|
); |
74
|
15433
|
|
|
15433
|
|
22270
|
$self->{_color_severity_medium} = firstval { defined } ( |
75
|
|
|
|
|
|
|
delete $args{'color-severity-medium'}, |
76
|
|
|
|
|
|
|
delete $args{'colour-severity-medium'}, |
77
|
|
|
|
|
|
|
delete $args{'color-severity-3'}, |
78
|
3091
|
|
|
|
|
14002
|
delete $args{'colour-severity-3'}, |
79
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_MEDIUM_DEFAULT, |
80
|
|
|
|
|
|
|
); |
81
|
15433
|
|
|
15433
|
|
21657
|
$self->{_color_severity_low} = firstval { defined } ( |
82
|
|
|
|
|
|
|
delete $args{'color-severity-low'}, |
83
|
|
|
|
|
|
|
delete $args{'colour-severity-low'}, |
84
|
|
|
|
|
|
|
delete $args{'color-severity-2'}, |
85
|
3091
|
|
|
|
|
13045
|
delete $args{'colour-severity-2'}, |
86
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_LOW_DEFAULT, |
87
|
|
|
|
|
|
|
); |
88
|
15433
|
|
|
15433
|
|
21912
|
$self->{_color_severity_lowest} = firstval { defined } ( |
89
|
|
|
|
|
|
|
delete $args{'color-severity-lowest'}, |
90
|
|
|
|
|
|
|
delete $args{'colour-severity-lowest'}, |
91
|
|
|
|
|
|
|
delete $args{'color-severity-1'}, |
92
|
3091
|
|
|
|
|
12336
|
delete $args{'colour-severity-1'}, |
93
|
|
|
|
|
|
|
$PROFILE_COLOR_SEVERITY_LOWEST_DEFAULT, |
94
|
|
|
|
|
|
|
); |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
# If we're using a pager or not outputting to a tty don't use colors. |
97
|
|
|
|
|
|
|
# Can't use IO::Interactive here because we /don't/ want to check STDIN. |
98
|
3091
|
50
|
66
|
|
|
11719
|
my $default_color = ($self->pager() or not -t *STDOUT) ? $FALSE : $TRUE; ## no critic (ProhibitInteractiveTest) |
99
|
9267
|
|
|
9267
|
|
16868
|
$self->{_color} = firstval { defined } ( |
100
|
|
|
|
|
|
|
delete $args{color}, |
101
|
|
|
|
|
|
|
delete $args{colour}, |
102
|
3091
|
|
|
|
|
20070
|
$default_color |
103
|
|
|
|
|
|
|
); |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
# If there's anything left, complain. |
106
|
3091
|
|
|
|
|
13189
|
_check_for_extra_options(%args); |
107
|
|
|
|
|
|
|
|
108
|
3090
|
|
|
|
|
6900
|
return $self; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
sub _check_for_extra_options { |
114
|
3091
|
|
|
3091
|
|
7564
|
my %args = @_; |
115
|
|
|
|
|
|
|
|
116
|
3091
|
100
|
|
|
|
12060
|
if ( my @remaining = sort keys %args ){ |
117
|
1
|
|
|
|
|
13
|
my $errors = Perl::Critic::Exception::AggregateConfiguration->new(); |
118
|
|
|
|
|
|
|
|
119
|
1
|
|
|
|
|
948
|
foreach my $option_name (@remaining) { |
120
|
2
|
|
|
|
|
25
|
$errors->add_exception( |
121
|
|
|
|
|
|
|
Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter->new( |
122
|
|
|
|
|
|
|
option_name => $option_name, |
123
|
|
|
|
|
|
|
) |
124
|
|
|
|
|
|
|
) |
125
|
|
|
|
|
|
|
} |
126
|
|
|
|
|
|
|
|
127
|
1
|
|
|
|
|
9
|
$errors->rethrow(); |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
|
130
|
3090
|
|
|
|
|
7022
|
return; |
131
|
|
|
|
|
|
|
} |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
134
|
|
|
|
|
|
|
# Public ACCESSOR methods |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
sub severity { |
137
|
2856
|
|
|
2856
|
1
|
6105
|
my ($self) = @_; |
138
|
2856
|
|
|
|
|
8728
|
return $self->{_severity}; |
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
sub theme { |
144
|
2871
|
|
|
2871
|
1
|
6272
|
my ($self) = @_; |
145
|
2871
|
|
|
|
|
8009
|
return $self->{_theme}; |
146
|
|
|
|
|
|
|
} |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
sub exclude { |
151
|
2923
|
|
|
2923
|
1
|
6373
|
my ($self) = @_; |
152
|
2923
|
|
|
|
|
9413
|
return $self->{_exclude}; |
153
|
|
|
|
|
|
|
} |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
sub include { |
158
|
2923
|
|
|
2923
|
1
|
7505
|
my ($self) = @_; |
159
|
2923
|
|
|
|
|
10769
|
return $self->{_include}; |
160
|
|
|
|
|
|
|
} |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
sub only { |
165
|
2917
|
|
|
2917
|
1
|
6424
|
my ($self) = @_; |
166
|
2917
|
|
|
|
|
9210
|
return $self->{_only}; |
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
sub profile_strictness { |
172
|
2921
|
|
|
2921
|
1
|
5942
|
my ($self) = @_; |
173
|
2921
|
|
|
|
|
8626
|
return $self->{_profile_strictness}; |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
sub single_policy { |
179
|
2921
|
|
|
2921
|
1
|
6528
|
my ($self) = @_; |
180
|
2921
|
|
|
|
|
10464
|
return $self->{_single_policy}; |
181
|
|
|
|
|
|
|
} |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
sub verbose { |
186
|
2923
|
|
|
2923
|
1
|
6228
|
my ($self) = @_; |
187
|
2923
|
|
|
|
|
9585
|
return $self->{_verbose}; |
188
|
|
|
|
|
|
|
} |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
sub color { |
193
|
2924
|
|
|
2924
|
1
|
6652
|
my ($self) = @_; |
194
|
2924
|
|
|
|
|
10717
|
return $self->{_color}; |
195
|
|
|
|
|
|
|
} |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
sub pager { |
200
|
6014
|
|
|
6014
|
1
|
11965
|
my ($self) = @_; |
201
|
6014
|
|
|
|
|
48365
|
return $self->{_pager}; |
202
|
|
|
|
|
|
|
} |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
sub allow_unsafe { |
207
|
2917
|
|
|
2917
|
1
|
6146
|
my ($self) = @_; |
208
|
2917
|
|
|
|
|
9238
|
return $self->{_allow_unsafe}; |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
sub criticism_fatal { |
214
|
2921
|
|
|
2921
|
1
|
6039
|
my ($self) = @_; |
215
|
2921
|
|
|
|
|
9026
|
return $self->{_criticism_fatal}; |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
sub force { |
221
|
2917
|
|
|
2917
|
1
|
5961
|
my ($self) = @_; |
222
|
2917
|
|
|
|
|
11540
|
return $self->{_force}; |
223
|
|
|
|
|
|
|
} |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
sub top { |
228
|
2921
|
|
|
2921
|
1
|
5961
|
my ($self) = @_; |
229
|
2921
|
|
|
|
|
7390
|
return $self->{_top}; |
230
|
|
|
|
|
|
|
} |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
sub color_severity_highest { |
235
|
2926
|
|
|
2926
|
1
|
6692
|
my ($self) = @_; |
236
|
2926
|
|
|
|
|
13278
|
return $self->{_color_severity_highest}; |
237
|
|
|
|
|
|
|
} |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
sub color_severity_high { |
242
|
2926
|
|
|
2926
|
1
|
6112
|
my ($self) = @_; |
243
|
2926
|
|
|
|
|
11031
|
return $self->{_color_severity_high}; |
244
|
|
|
|
|
|
|
} |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
sub color_severity_medium { |
249
|
2926
|
|
|
2926
|
1
|
6967
|
my ($self) = @_; |
250
|
2926
|
|
|
|
|
11426
|
return $self->{_color_severity_medium}; |
251
|
|
|
|
|
|
|
} |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
sub color_severity_low { |
256
|
2926
|
|
|
2926
|
1
|
7132
|
my ($self) = @_; |
257
|
2926
|
|
|
|
|
11073
|
return $self->{_color_severity_low}; |
258
|
|
|
|
|
|
|
} |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
sub color_severity_lowest { |
263
|
2926
|
|
|
2926
|
1
|
6262
|
my ($self) = @_; |
264
|
2926
|
|
|
|
|
10469
|
return $self->{_color_severity_lowest}; |
265
|
|
|
|
|
|
|
} |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
sub program_extensions { |
270
|
2923
|
|
|
2923
|
1
|
6282
|
my ($self) = @_; |
271
|
2923
|
|
|
|
|
6696
|
return $self->{_program_extensions}; |
272
|
|
|
|
|
|
|
} |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
1; |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
__END__ |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
=pod |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
=head1 NAME |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
Perl::Critic::OptionsProcessor - The global configuration default values, combined with command-line values. |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
=head1 DESCRIPTION |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
This is a helper class that encapsulates the default parameters for |
292
|
|
|
|
|
|
|
constructing a L<Perl::Critic::Config|Perl::Critic::Config> object. |
293
|
|
|
|
|
|
|
There are no user-serviceable parts here. |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
=head1 INTERFACE SUPPORT |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
This is considered to be a non-public class. Its interface is subject |
299
|
|
|
|
|
|
|
to change without notice. |
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
=over |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
=item C< new( %DEFAULT_PARAMS ) > |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
Returns a reference to a new C<Perl::Critic::OptionsProcessor> object. |
309
|
|
|
|
|
|
|
You can override the coded defaults by passing in name-value pairs |
310
|
|
|
|
|
|
|
that correspond to the methods listed below. |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
This is usually only invoked by |
313
|
|
|
|
|
|
|
L<Perl::Critic::UserProfile|Perl::Critic::UserProfile>, which passes |
314
|
|
|
|
|
|
|
in the global values from a F<.perlcriticrc> file. This object |
315
|
|
|
|
|
|
|
contains no information for individual Policies. |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
=back |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
=head1 METHODS |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
=over |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
=item C< exclude() > |
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
Returns a reference to a list of the default exclusion patterns. If |
326
|
|
|
|
|
|
|
onto by |
327
|
|
|
|
|
|
|
L<Perl::Critic::PolicyParameter|Perl::Critic::PolicyParameter>. there |
328
|
|
|
|
|
|
|
are no default exclusion patterns, then the list will be empty. |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
=item C< force() > |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
Returns the default value of the C<force> flag (Either 1 or 0). |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
=item C< include() > |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
Returns a reference to a list of the default inclusion patterns. If |
339
|
|
|
|
|
|
|
there are no default exclusion patterns, then the list will be empty. |
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
=item C< only() > |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
Returns the default value of the C<only> flag (Either 1 or 0). |
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
=item C< profile_strictness() > |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
Returns the default value of C<profile_strictness> as an unvalidated |
350
|
|
|
|
|
|
|
string. |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
=item C< single_policy() > |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
Returns the default C<single-policy> pattern. (As a string.) |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
=item C< severity() > |
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
Returns the default C<severity> setting. (1..5). |
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
=item C< theme() > |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
Returns the default C<theme> setting. (As a string). |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
=item C< top() > |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
Returns the default C<top> setting. (Either 0 or a positive integer). |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
=item C< verbose() > |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
Returns the default C<verbose> setting. (Either a number or format |
376
|
|
|
|
|
|
|
string). |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
=item C< color() > |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
Returns the default C<color> setting. (Either 1 or 0). |
382
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
=item C< pager() > |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
Returns the default C<pager> setting. (Either empty string or the pager |
387
|
|
|
|
|
|
|
command string). |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
=item C< allow_unsafe() > |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
Returns the default C<allow-unsafe> setting. (Either 1 or 0). |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
=item C< criticism_fatal() > |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
Returns the default C<criticism-fatal> setting (Either 1 or 0). |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
=item C< color_severity_highest() > |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
Returns the color to be used for coloring highest severity violations. |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
=item C< color_severity_high() > |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
Returns the color to be used for coloring high severity violations. |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
=item C< color_severity_medium() > |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
Returns the color to be used for coloring medium severity violations. |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
=item C< color_severity_low() > |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
Returns the color to be used for coloring low severity violations. |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
=item C< color_severity_lowest() > |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
Returns the color to be used for coloring lowest severity violations. |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
=item C< program_extensions() > |
420
|
|
|
|
|
|
|
|
421
|
|
|
|
|
|
|
Returns a reference to the array of file name extensions to be interpreted as |
422
|
|
|
|
|
|
|
representing Perl programs. |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
=back |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
=head1 SEE ALSO |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
L<Perl::Critic::Config|Perl::Critic::Config>, |
430
|
|
|
|
|
|
|
L<Perl::Critic::UserProfile|Perl::Critic::UserProfile> |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
=head1 AUTHOR |
434
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
=head1 COPYRIGHT |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved. |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
443
|
|
|
|
|
|
|
it under the same terms as Perl itself. The full text of this license |
444
|
|
|
|
|
|
|
can be found in the LICENSE file included with this module. |
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
=cut |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
# Local Variables: |
449
|
|
|
|
|
|
|
# mode: cperl |
450
|
|
|
|
|
|
|
# cperl-indent-level: 4 |
451
|
|
|
|
|
|
|
# fill-column: 78 |
452
|
|
|
|
|
|
|
# indent-tabs-mode: nil |
453
|
|
|
|
|
|
|
# c-indentation-style: bsd |
454
|
|
|
|
|
|
|
# End: |
455
|
|
|
|
|
|
|
# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround : |