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
44100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
100TFelsif ($item =~ /^([A-Z])(.*)/u) { }
46100TFif $value < $next
49100TFif (defined $CheckSpelling::SpellingCollator::expected{$item}) { }
54100TFif (defined $CheckSpelling::SpellingCollator::expected{$item})
60100TFunless defined $next
67100TFif expect_item($word, 1)
6950TFif expect_item($key, 2)
70100TFif ($key =~ /.s$/u) { }
100TFelsif ($key =~ /^(.+[^aeiou])ed$/u) { }
100TFelsif ($key =~ /^(.+)'[ds]$/u) { }
71100TFif ($key =~ /ies$/u) { }
8350TFif expect_item($key, 3)
89100TFif ($warning =~ /\(([-\w]+)\)$/u)
92100TFif $CheckSpelling::SpellingCollator::ignored_event_map{$code}
9950TFif should_skip_warning($warning)
100100TFif skip_item($item)
103100TFif (defined $seen_count)
104100TFif (not defined $unknown_word_limit or $seen_count++ < $unknown_word_limit) { }
12050TFif $CheckSpelling::SpellingCollator::disable_word_collating
122100TFif ($key =~ /.s$/u) { }
100TFelsif ($key =~ /.[^aeiou]ed$/u) { }
123100TFif ($key =~ /ies$/u) { }
138100TFif ($CheckSpelling::SpellingCollator::disable_word_collating) { }
15550TFif (open EXPECT, "<:utf8", $expect)
172100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
174100TFif defined $word_map{$word}
17650TFif $words > 2
177100TFif ($word eq $key)
17850TFif $words > 1
187100TFif $CheckSpelling::SpellingCollator::disable_word_collating
193100TFif $key eq $plural_key
194100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
209100TFif ($warning =~ /\(([-\w]+)\)$/u)
21150TFif defined $CheckSpelling::SpellingCollator::ignored_event_map{$code}
22550TFunless defined $ENV{$path}
22750TFunless open ITEMS, "<:utf8", $1
233100TFif ($pattern =~ /^#/u)
23450TFif ($pattern =~ /^# /u) { }
242100TFunless ($pattern =~ /./u)
255100TFunless @{$totals;}
25650TFunless open my $fh, ">:utf8", $path
259100TFif ($file_counts) { }
2610TFunless $totals->[$b] <=> $totals->[$a]
27050TFunless $totals->[$i] > 0
27350TFif ($rule_with_context =~ /^(.*\n)([^\n]+)$/su) { }
278100TF$file_counts ? :
290100TFif $file eq $special->{'file_list'}
291100TFif $file eq $special->{'pr_title_file'}
292100TFif $file eq $special->{'pr_description_file'}
293100TFunless rindex $file, $special->{'commit_messages'}
307100TFif ($ignored_events)
33850TFif ($timing_report)
35750TFunless $directory =~ /^(.*)$/u
359100TFunless (-e $directory)
363100TFunless (-d $directory)
369100TFunless open NAME, "<:utf8", "$directory/name"
37850TFif ($timing_report)
382100TFif (-e "$directory/skipped")
39050TFif $timing_report
395100TFunless (-s "$directory/stats")
39650TFif $timing_report
401100TFif ($file eq $file_list)
422100TFif (@candidate_totals)
42550TFif (@candidate_list)
42850TFif ($hits)
43050TFif ($candidate_file_counts[$i]++ < $candidate_example_limit)
43650TFif ($candidates[$i] =~ /^#\s+(\S.+)/u)
445100TFif (@forbidden_totals)
44850TFif (@forbidden_list)
45150TFif ($hits)
46050TFif $timing_report
463100TFif ($unknown > $unique)
46750TFunless ($disable_noisy_file)
46850TFif ($kind eq "file")
479100TFunless ($kind =~ /^file/u and -s "$directory/unknown")
485100TFunless $token =~ /./u
487100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}
489100TFif defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
49650TFif $timing_report
51550TFif ($context =~ /^(.*?)$(.*)/msu)
51750TFif $details
51950TFunless $context
529100TFif (defined $ENV{'expect'})
539100TFif (-s $early_warnings)
54450TFif should_skip_warning($warning)
553100TFunless -s "$directory/warnings"
55450TFunless open NAME, "<:utf8", "$directory/name"
559100TFif ($kind ne 'file-list') { }
562100TFif ($warning =~ /:(\d+):(\d+ \.\.\. \d+): `(.*)`/u) { }
566100TFunless $kind eq "file"
568100TFif log_skip_item($item, $file, $warning, $unknown_word_limit)
56950TFif $kind ne "file"
57150TFif ($warning =~ /\`(.*?)\` in line \(token-is-substring\)/u)
5720TFif skip_item($1)
57650TFif should_skip_warning($warning)
58250TFunless $warning =~ s/^:(\d+)/:1/u
584100TFif ($warning =~ /:(\d+ \.\.\. \d+): `(.*)`/u)
58850TFif skip_item($item)
58950TFif (defined $unknown_file_word_limit)
590100TFif ++$unknown_file_word_count{$item} > $unknown_file_word_limit
593100TFif should_skip_warning($warning)
60350TFif should_skip_warning($warning)
607100TFif (defined $unknown_word_limit)
61050TFunless $warning_count >= $unknown_word_limit
6130TFif should_skip_warning($warning)
620100TFif (%counters)
636100TFif (scalar @words > 1) { }
63750TFunless length $a <=> length $b