Branch Coverage

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

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
393100TFunless (-s "$directory/stats")
39450TFif $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
457100TFif ($unknown > $unique)
46150TFunless ($disable_noisy_file)
46250TFif ($kind eq "file")
473100TFunless ($kind =~ /^file/u and -s "$directory/unknown")
479100TFunless $token =~ /./u
481100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}
483100TFif defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
49050TFif $timing_report
50950TFif ($context =~ /^(.*?)$(.*)/msu)
51150TFif $details
51350TFunless $context
523100TFif (defined $ENV{'expect'})
533100TFif (-s $early_warnings)
53850TFif should_skip_warning($warning)
547100TFunless -s "$directory/warnings"
54850TFunless open NAME, "<:utf8", "$directory/name"
553100TFif ($kind ne 'file-list') { }
556100TFif ($warning =~ /:(\d+):(\d+ \.\.\. \d+): `(.*)`/u) { }
560100TFunless $kind eq "file"
562100TFif log_skip_item($item, $file, $warning, $unknown_word_limit)
56350TFif $kind ne "file"
56550TFif ($warning =~ /\`(.*?)\` in line \(token-is-substring\)/u)
5660TFif skip_item($1)
57050TFif should_skip_warning($warning)
57650TFunless $warning =~ s/^:(\d+)/:1/u
578100TFif ($warning =~ /:(\d+ \.\.\. \d+): `(.*)`/u)
58250TFif skip_item($item)
58350TFif (defined $unknown_file_word_limit)
584100TFif ++$unknown_file_word_count{$item} > $unknown_file_word_limit
587100TFif should_skip_warning($warning)
59750TFif should_skip_warning($warning)
601100TFif (defined $unknown_word_limit)
60450TFunless $warning_count >= $unknown_word_limit
6070TFif should_skip_warning($warning)
614100TFif (%counters)
630100TFif (scalar @words > 1) { }
63150TFunless length $a <=> length $b