File Coverage

File:lib/CheckSpelling/CheckDictionary.pm
Coverage:92.9%

linestmtbrancondsubtimecode
1#! -*-perl-*-
2
3package CheckSpelling::CheckDictionary;
4
5sub process_line {
6
15
1304
    my ($file, $line) = @_;
7
15
60
    $line =~ s/$ENV{comment_char}.*//;
8
15
13
    my $ignore_pattern = $ENV{INPUT_IGNORE_PATTERN};
9
15
106
    if ($ignore_pattern ne '' && $line =~ /^.*?($ignore_pattern+)/) {
10
4
10
        my ($left, $right) = ($-[1] + 1, $+[1] + 1);
11
4
5
        my $column_range="$left ... $right";
12
4
15
        return ('', "$file:$.:$column_range, Warning - Ignoring entry because it contains non-alpha characters. (non-alpha-in-dictionary)\n");
13    }
14
11
14
    return ($line, '');
15}
16
171;