Branch Coverage

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

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}
22350TFunless defined $ENV{$path}
22550TFunless open ITEMS, "<:utf8", $1
231100TFif ($pattern =~ /^#/u)
23250TFif ($pattern =~ /^# /u) { }
240100TFunless ($pattern =~ /./u)
253100TFunless @{$totals;}
25450TFunless open my $fh, ">:utf8", $path
257100TFif ($file_counts) { }
2590TFunless $totals->[$b] <=> $totals->[$a]
26850TFunless $totals->[$i] > 0
27150TFif ($rule_with_context =~ /^(.*\n)([^\n]+)$/su) { }
276100TF$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)
420100TFif (@candidate_totals)
42350TFif (@candidate_list)
42650TFif ($hits)
42850TFif ($candidate_file_counts[$i]++ < $candidate_example_limit)
43450TFif ($candidates[$i] =~ /^#\s+(\S.+)/u)
443100TFif (@forbidden_totals)
44650TFif (@forbidden_list)
44950TFif ($hits)
45850TFif $timing_report
461100TFif ($unknown > $unique)
46550TFunless ($disable_noisy_file)
46650TFif ($kind eq "file")
477100TFunless ($kind =~ /^file/u and -s "$directory/unknown")
483100TFunless $token =~ /./u
485100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}
487100TFif defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
49450TFif $timing_report
51350TFif ($context =~ /^(.*?)$(.*)/msu)
51550TFif $details
51750TFunless $context
527100TFif (defined $ENV{'expect'})
537100TFif (-s $early_warnings)
54250TFif should_skip_warning($warning)
551100TFunless -s "$directory/warnings"
55250TFunless open NAME, "<:utf8", "$directory/name"
557100TFif ($kind ne 'file-list') { }
560100TFif ($warning =~ /:(\d+):(\d+ \.\.\. \d+): `(.*)`/u) { }
564100TFunless $kind eq "file"
566100TFif log_skip_item($item, $file, $warning, $unknown_word_limit)
56750TFif $kind ne "file"
56950TFif ($warning =~ /\`(.*?)\` in line \(token-is-substring\)/u)
5700TFif skip_item($1)
57450TFif should_skip_warning($warning)
58050TFunless $warning =~ s/^:(\d+)/:1/u
582100TFif ($warning =~ /:(\d+ \.\.\. \d+): `(.*)`/u)
58650TFif skip_item($item)
58750TFif (defined $unknown_file_word_limit)
588100TFif ++$unknown_file_word_count{$item} > $unknown_file_word_limit
591100TFif should_skip_warning($warning)
60150TFif should_skip_warning($warning)
605100TFif (defined $unknown_word_limit)
60850TFunless $warning_count >= $unknown_word_limit
6110TFif should_skip_warning($warning)
618100TFif (%counters)
634100TFif (scalar @words > 1) { }
63550TFunless length $a <=> length $b