| File: | lib/CheckSpelling/CheckDictionary.pm |
| Coverage: | 100.0% |
| line | stmt | bran | cond | sub | time | code |
|---|---|---|---|---|---|---|
| 1 | #! -*-perl-*- | |||||
| 2 | ||||||
| 3 | package CheckSpelling::CheckDictionary; | |||||
| 4 | ||||||
| 5 | sub process_line { | |||||
| 6 | 6 | 991 | my ($line) = @_; | |||
| 7 | 6 | 43 | $line =~ s/$ENV{comment_char}.*//; | |||
| 8 | 6 | 13 | my $ignore_pattern = $ENV{INPUT_IGNORE_PATTERN} || ''; | |||
| 9 | 6 | 54 | if ($ignore_pattern ne '' && $line =~ /^.*?($ignore_pattern+)/) { | |||
| 10 | 2 | 6 | my ($left, $right) = ($-[1] + 1, $+[1] + 1); | |||
| 11 | 2 | 2 | my $column_range="$left ... $right"; | |||
| 12 | 2 | 5 | return ('', "$column_range, Warning - Ignoring entry because it contains non-alpha characters (non-alpha-in-dictionary)\n"); | |||
| 13 | } | |||||
| 14 | 4 | 9 | return ($line, ''); | |||
| 15 | } | |||||
| 16 | ||||||
| 17 | 1; | |||||