Branch Coverage

File:lib/CheckSpelling/SpellingCollator.pm
Coverage:77.6%

line%coveragebranch
22100TFunless $record =~ /\b$field:\s*(\d+)/u
2850TFunless $record =~ /\b$field: \[([^\]]+)\]/u
3550TFunless $next and $next < $value
45100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
100TFelsif ($item =~ /^([A-Z])(.*)/u) { }
47100TFif $value < $next
50100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
55100TFif (defined $CheckSpelling::SpellingCollator::expected{$item})
61100TFunless defined $next
68100TFif expect_item($word, 1)
7050TFif expect_item($key, 2)
71100TFif ($key =~ /.s$/u) { }
100TFelsif ($key =~ /^(.+[^aeiou])ed$/u) { }
100TFelsif ($key =~ /^(.+)'[ds]$/u) { }
72100TFif ($key =~ /ies$/u) { }
8450TFif expect_item($key, 3)
90100TFif ($warning =~ /\(([-\w]+)\)$/u)
93100TFif $CheckSpelling::SpellingCollator::ignored_event_map{$code}
10050TFif should_skip_warning($warning)
101100TFif skip_item($item)
104100TFif (defined $seen_count)
105100TFif (not defined $unknown_word_limit or $seen_count++ < $unknown_word_limit) { }
12150TFif $CheckSpelling::SpellingCollator::disable_word_collating
123100TFunless defined $CheckSpelling::SpellingCollator::shortest_word
126100TFif ($key =~ /.s$/u) { }
100TFelsif ($key_length > $CheckSpelling::SpellingCollator::shortest_word + 1 and $key =~ /.[^aeiou]ed$/u) { }
127100TFif ($key_length > $CheckSpelling::SpellingCollator::shortest_word + 1 and $key =~ /ies$/u) { }
100TFelsif ($key_length > $CheckSpelling::SpellingCollator::shortest_word and not $key =~ /ies$/u) { }
142100TFif ($CheckSpelling::SpellingCollator::disable_word_collating) { }
15950TFif (open EXPECT, "<:utf8", $expect)
176100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
178100TFif defined $word_map{$word}
18050TFif $words > 2
181100TFif ($word eq $key)
18250TFif $words > 1
191100TFif $CheckSpelling::SpellingCollator::disable_word_collating
197100TFif $key eq $plural_key
198100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
213100TFif ($warning =~ /\(([-\w]+)\)$/u)
21550TFif defined $CheckSpelling::SpellingCollator::ignored_event_map{$code}
22950TFunless defined $ENV{$path}
23150TFunless open ITEMS, "<:utf8", $1
237100TFif ($pattern =~ /^#/u)
23850TFif ($pattern =~ /^# /u) { }
246100TFunless ($pattern =~ /./u)
259100TFunless @{$totals;}
26050TFunless open my $fh, ">:utf8", $path
263100TFif ($file_counts) { }
2650TFunless $totals->[$b] <=> $totals->[$a]
27450TFunless $totals->[$i] > 0
27750TFif ($rule_with_context =~ /^(.*\n)([^\n]+)$/su) { }
282100TF$file_counts ? :
294100TFif $file eq $special->{'file_list'}
295100TFif $file eq $special->{'pr_title_file'}
296100TFif $file eq $special->{'pr_description_file'}
297100TFunless rindex $file, $special->{'commit_messages'}
311100TFif ($ignored_events)
34350TFif ($timing_report)
36250TFunless $directory =~ /^(.*)$/u
364100TFunless (-e $directory)
368100TFunless (-d $directory)
374100TFunless open NAME, "<:utf8", "$directory/name"
38350TFif ($timing_report)
387100TFif (-e "$directory/skipped")
39550TFif $timing_report
400100TFunless (-s "$directory/stats")
40150TFif $timing_report
406100TFif ($file eq $file_list)
427100TFif (@candidate_totals)
43050TFif (@candidate_list)
43350TFif ($hits)
43550TFif ($candidate_file_counts[$i]++ < $candidate_example_limit)
44150TFif ($candidates[$i] =~ /^#\s+(\S.+)/u)
450100TFif (@forbidden_totals)
45350TFif (@forbidden_list)
45650TFif ($hits)
46550TFif $timing_report
468100TFif ($unknown > $unique)
47250TFunless ($disable_noisy_file)
47350TFif ($kind eq "file")
484100TFunless ($kind =~ /^file/u and -s "$directory/unknown")
490100TFunless $token =~ /./u
492100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}
494100TFif defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
50150TFif $timing_report
52050TFif ($context =~ /^(.*?)$(.*)/msu)
52250TFif $details
52450TFunless $context
534100TFif (defined $ENV{'expect'})
544100TFif (-s $early_warnings)
54950TFif should_skip_warning($warning)
558100TFunless -s "$directory/warnings"
55950TFunless open NAME, "<:utf8", "$directory/name"
564100TFif ($kind ne 'file-list') { }
567100TFif ($warning =~ /:(\d+):(\d+ \.\.\. \d+): `(.*)`/u) { }
571100TFunless $kind eq "file"
573100TFif log_skip_item($item, $file, $warning, $unknown_word_limit)
57450TFif $kind ne "file"
57650TFif ($warning =~ /\`(.*?)\` in line \(token-is-substring\)/u)
5770TFif skip_item($1)
58150TFif should_skip_warning($warning)
58750TFunless $warning =~ s/^:(\d+)/:1/u
589100TFif ($warning =~ /:(\d+ \.\.\. \d+): `(.*)`/u)
59350TFif skip_item($item)
59450TFif (defined $unknown_file_word_limit)
595100TFif ++$unknown_file_word_count{$item} > $unknown_file_word_limit
598100TFif should_skip_warning($warning)
60850TFif should_skip_warning($warning)
612100TFif (defined $unknown_word_limit)
61550TFunless $warning_count >= $unknown_word_limit
6180TFif should_skip_warning($warning)
625100TFif (%counters)
641100TFif (scalar @words > 1) { }
64250TFunless length $a <=> length $b