VIOLATION:
for my $violation ( $policy->violates( $element, $doc ) ) {
my $line = $violation->location()->[0];
- next VIOLATION if $doc->line_is_disabled($line, $policy_name)
+ next VIOLATION if $doc->is_line_disabled($line, $policy_name)
and not exists $policies_that_cannot_be_disabled{$policy_name};
push @violations, $violation;
#-----------------------------------------------------------------------------
-sub line_is_disabled {
+sub is_line_disabled {
my ($self, $line, $policy_name) = @_;
return 0 if not exists $self->{_disabled_lines}->{$line};
return 1 if $self->{_disabled_lines}->{$line}->{$policy_name};