Branch Coverage

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

line%coveragebranch
21100TFunless $record =~ /\b$field:\s*(\d+)/u
2750TFunless $record =~ /\b$field: \[([^\]]+)\]/u
3450TFunless $next and $next < $value
43100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
100TFelsif ($item =~ /^([A-Z])(.*)/u) { }
45100TFif $value < $next
48100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
53100TFif (defined $CheckSpelling::SpellingCollator::expected{$item})
59100TFunless defined $next
66100TFif expect_item($word, 1)
6850TFif expect_item($key, 2)
69100TFif ($key =~ /.s$/u) { }
100TFelsif ($key =~ /^(.+[^aeiou])ed$/u) { }
100TFelsif ($key =~ /^(.+)'[ds]$/u) { }
70100TFif ($key =~ /ies$/u) { }
8250TFif expect_item($key, 3)
88100TFif ($warning =~ /\(([-\w]+)\)$/u)
91100TFif $CheckSpelling::SpellingCollator::ignored_event_map{$code}
9850TFif should_skip_warning($warning)
99100TFif skip_item($item)
102100TFif (defined $seen_count)
103100TFif (not defined $unknown_word_limit or $seen_count++ < $unknown_word_limit) { }
11950TFif $CheckSpelling::SpellingCollator::disable_word_collating
121100TFif ($key =~ /.s$/u) { }
100TFelsif ($key =~ /.[^aeiou]ed$/u) { }
122100TFif ($key =~ /ies$/u) { }
137100TFif ($CheckSpelling::SpellingCollator::disable_word_collating) { }
15450TFif (open EXPECT, "<:utf8", $expect)
171100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
173100TFif defined $word_map{$word}
17550TFif $words > 2
176100TFif ($word eq $key)
17750TFif $words > 1
186100TFif $CheckSpelling::SpellingCollator::disable_word_collating
192100TFif $key eq $plural_key
193100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
208100TFif ($warning =~ /\(([-\w]+)\)$/u)
21050TFif defined $CheckSpelling::SpellingCollator::ignored_event_map{$code}
22450TFunless defined $ENV{$path}
22650TFunless open ITEMS, "<:utf8", $1
232100TFif ($pattern =~ /^#/u)
23350TFif ($pattern =~ /^# /u) { }
241100TFunless ($pattern =~ /./u)
254100TFunless @{$totals;}
25550TFunless open my $fh, ">:utf8", $path
258100TFif ($file_counts) { }
2600TFunless $totals->[$b] <=> $totals->[$a]
26950TFunless $totals->[$i] > 0
27250TFif ($rule_with_context =~ /^(.*\n)([^\n]+)$/su) { }
277100TF$file_counts ? :
289100TFif $file eq $special->{'file_list'}
290100TFif $file eq $special->{'pr_title_file'}
291100TFif $file eq $special->{'pr_description_file'}
292100TFunless rindex $file, $special->{'commit_messages'}
306100TFif ($ignored_events)
33750TFif ($timing_report)
35650TFunless $directory =~ /^(.*)$/u
358100TFunless (-e $directory)
362100TFunless (-d $directory)
368100TFunless open NAME, "<:utf8", "$directory/name"
37750TFif ($timing_report)
381100TFif (-e "$directory/skipped")
38950TFif $timing_report
394100TFunless (-s "$directory/stats")
39550TFif $timing_report
400100TFif ($file eq $file_list)
421100TFif (@candidate_totals)
42450TFif (@candidate_list)
42750TFif ($hits)
42950TFif ($candidate_file_counts[$i]++ < $candidate_example_limit)
43550TFif ($candidates[$i] =~ /^#\s+(\S.+)/u)
444100TFif (@forbidden_totals)
44750TFif (@forbidden_list)
45050TFif ($hits)
45950TFif $timing_report
462100TFif ($unknown > $unique)
46650TFunless ($disable_noisy_file)
46750TFif ($kind eq "file")
478100TFunless ($kind =~ /^file/u and -s "$directory/unknown")
484100TFunless $token =~ /./u
486100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}
488100TFif defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
49550TFif $timing_report
51450TFif ($context =~ /^(.*?)$(.*)/msu)
51650TFif $details
51850TFunless $context
528100TFif (defined $ENV{'expect'})
538100TFif (-s $early_warnings)
54350TFif should_skip_warning($warning)
552100TFunless -s "$directory/warnings"
55350TFunless open NAME, "<:utf8", "$directory/name"
558100TFif ($kind ne 'file-list') { }
561100TFif ($warning =~ /:(\d+):(\d+ \.\.\. \d+): `(.*)`/u) { }
565100TFunless $kind eq "file"
567100TFif log_skip_item($item, $file, $warning, $unknown_word_limit)
56850TFif $kind ne "file"
57050TFif ($warning =~ /\`(.*?)\` in line \(token-is-substring\)/u)
5710TFif skip_item($1)
57550TFif should_skip_warning($warning)
58150TFunless $warning =~ s/^:(\d+)/:1/u
583100TFif ($warning =~ /:(\d+ \.\.\. \d+): `(.*)`/u)
58750TFif skip_item($item)
58850TFif (defined $unknown_file_word_limit)
589100TFif ++$unknown_file_word_count{$item} > $unknown_file_word_limit
592100TFif should_skip_warning($warning)
60250TFif should_skip_warning($warning)
606100TFif (defined $unknown_word_limit)
60950TFunless $warning_count >= $unknown_word_limit
6120TFif should_skip_warning($warning)
619100TFif (%counters)
635100TFif (scalar @words > 1) { }
63650TFunless length $a <=> length $b