| File: | /home/runner/work/check-spelling/check-spelling/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 | 14 | 801 | my ($file, $line) = @_; | |||
| 7 | 14 | 45 | $line =~ s/$ENV{comment_char}.*//; | |||
| 8 | 14 | 19 | my $ignore_pattern = $ENV{INPUT_IGNORE_PATTERN} || ''; | |||
| 9 | 14 | 77 | if ($ignore_pattern ne '' && $line =~ /^.*?($ignore_pattern+)/) { | |||
| 10 | 3 | 6 | my ($left, $right) = ($-[1] + 1, $+[1] + 1); | |||
| 11 | 3 | 6 | my $column_range="$left ... $right"; | |||
| 12 | 3 | 9 | return ('', "$file:$.:$column_range, Warning - Ignoring entry because it contains non-alpha characters (non-alpha-in-dictionary)\n"); | |||
| 13 | } | |||||
| 14 | 11 | 15 | return ($line, ''); | |||
| 15 | } | |||||
| 16 | ||||||
| 17 | 1; | |||||