Branch Coverage

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

line%coveragebranch
20100TFunless $record =~ /\b$field:\s*(\d+)/u
2650TFunless $record =~ /\b$field: \[([^\]]+)\]/u
3350TFunless $next and $next < $value
42100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
100TFelsif ($item =~ /^([A-Z])(.*)/u) { }
44100TFif $value < $next
47100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
52100TFif (defined $CheckSpelling::SpellingCollator::expected{$item})
58100TFunless defined $next
65100TFif expect_item($word, 1)
6750TFif expect_item($key, 2)
68100TFif ($key =~ /.s$/u) { }
100TFelsif ($key =~ /^(.+[^aeiou])ed$/u) { }
100TFelsif ($key =~ /^(.+)'[ds]$/u) { }
69100TFif ($key =~ /ies$/u) { }
8150TFif expect_item($key, 3)
87100TFif ($warning =~ /\(([-\w]+)\)$/u)
90100TFif $CheckSpelling::SpellingCollator::ignored_event_map{$code}
9750TFif should_skip_warning($warning)
98100TFif skip_item($item)
101100TFif (defined $seen_count)
102100TFif (not defined $unknown_word_limit or $seen_count++ < $unknown_word_limit) { }
11850TFif $CheckSpelling::SpellingCollator::disable_word_collating
120100TFif ($key =~ /.s$/u) { }
100TFelsif ($key =~ /.[^aeiou]ed$/u) { }
121100TFif ($key =~ /ies$/u) { }
136100TFif ($CheckSpelling::SpellingCollator::disable_word_collating) { }
15350TFif (open EXPECT, "<:utf8", $expect)
170100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
172100TFif defined $word_map{$word}
17450TFif $words > 2
175100TFif ($word eq $key)
17650TFif $words > 1
185100TFif $CheckSpelling::SpellingCollator::disable_word_collating
191100TFif $key eq $plural_key
192100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
207100TFif ($warning =~ /\(([-\w]+)\)$/u)
20950TFif defined $CheckSpelling::SpellingCollator::ignored_event_map{$code}
223100TFunless defined $ENV{$path}
22550TFunless open ITEMS, "<:utf8", $1
231100TFif ($pattern =~ /^#/u)
23250TFif ($pattern =~ /^# /u) { }
24050TFunless ($pattern =~ /./u)
253100TFunless @{$totals;}
25450TFunless open my $fh, ">:utf8", $path
25750TFif ($file_counts) { }
2590TFunless $totals->[$b] <=> $totals->[$a]
26850TFunless $totals->[$i] > 0
27150TFif ($rule_with_context =~ /^(.*\n)([^\n]+)$/su) { }
27650TF$file_counts ? :
288100TFif $file eq $special->{'file_list'}
289100TFif $file eq $special->{'pr_title_file'}
290100TFif $file eq $special->{'pr_description_file'}
291100TFunless rindex $file, $special->{'commit_messages'}
305100TFif ($ignored_events)
33650TFif ($timing_report)
35550TFunless $directory =~ /^(.*)$/u
357100TFunless (-e $directory)
361100TFunless (-d $directory)
367100TFunless open NAME, "<:utf8", "$directory/name"
37650TFif ($timing_report)
380100TFif (-e "$directory/skipped")
38850TFif $timing_report
394100TFunless (-s "$directory/stats")
39550TFif $timing_report
399100TFif ($file eq $file_list)
42050TFif (@candidate_totals)
4230TFif (@candidate_list)
4260TFif ($hits)
4280TFif ($candidate_file_counts[$i]++ < $candidate_example_limit)
439100TFif (@forbidden_totals)
44250TFif (@forbidden_list)
44550TFif ($hits)
45450TFif $timing_report
45750TFif ($unknown > $unique)
4610TFunless ($disable_noisy_file)
4620TFif ($kind eq "file")
471100TFunless ($kind =~ /^file/u and -s "$directory/unknown")
477100TFunless $token =~ /./u
479100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}
481100TFif defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
48850TFif $timing_report
50750TFif ($context =~ /^(.*?)$(.*)/msu)
50950TFif $details
51150TFunless $context
521100TFif (defined $ENV{'expect'})
531100TFif (-s $early_warnings)
53650TFif should_skip_warning($warning)
545100TFunless -s "$directory/warnings"
54650TFunless open NAME, "<:utf8", "$directory/name"
551100TFif ($kind ne 'file-list') { }
554100TFif ($warning =~ /:(\d+):(\d+ \.\.\. \d+): `(.*)`/u) { }
558100TFunless $kind eq "file"
560100TFif log_skip_item($item, $file, $warning, $unknown_word_limit)
56150TFif $kind ne "file"
56350TFif ($warning =~ /\`(.*?)\` in line\. \(token-is-substring\)/u)
5640TFif skip_item($1)
56850TFif should_skip_warning($warning)
57450TFunless $warning =~ s/^:(\d+)/:1/u
576100TFif ($warning =~ /:(\d+ \.\.\. \d+): `(.*)`/u)
58050TFif skip_item($item)
58150TFif (defined $unknown_file_word_limit)
582100TFif ++$unknown_file_word_count{$item} > $unknown_file_word_limit
585100TFif should_skip_warning($warning)
59550TFif should_skip_warning($warning)
599100TFif (defined $unknown_word_limit)
60250TFunless $warning_count >= $unknown_word_limit
6050TFif should_skip_warning($warning)
612100TFif (%counters)
628100TFif (scalar @words > 1) { }
62950TFunless length $a <=> length $b