Branch Coverage

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

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)
9150TFif CheckSpelling::Util::is_ignoring_event($code)
9850TFunless $warning =~ /\(([-\w]+)\)$/u
100100TFif CheckSpelling::Util::is_ignoring_event($code)
10950TFif should_skip_warning($warning)
110100TFif skip_item($item)
113100TFif (defined $seen_count)
114100TFif (not defined $unknown_word_limit or $seen_count++ < $unknown_word_limit) { }
13050TFif $CheckSpelling::SpellingCollator::disable_word_collating
132100TFunless defined $CheckSpelling::SpellingCollator::shortest_word
135100TFif ($key =~ /.s$/u) { }
100TFelsif ($key_length > $CheckSpelling::SpellingCollator::shortest_word + 1 and $key =~ /.[^aeiou]ed$/u) { }
136100TFif ($key_length > $CheckSpelling::SpellingCollator::shortest_word + 1 and $key =~ /ies$/u) { }
100TFelsif ($key_length > $CheckSpelling::SpellingCollator::shortest_word and not $key =~ /ies$/u) { }
151100TFif ($CheckSpelling::SpellingCollator::disable_word_collating) { }
16850TFif (open EXPECT, "<:utf8", $expect)
185100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
187100TFif defined $word_map{$word}
18950TFif $words > 2
190100TFif ($word eq $key)
19150TFif $words > 1
200100TFif $CheckSpelling::SpellingCollator::disable_word_collating
206100TFif $key eq $plural_key
207100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
221100TFif ($warning =~ /\(([-\w]+)\)$/u)
223100TFif CheckSpelling::Util::is_ignoring_event($code)
23850TFunless defined $ENV{$path}
24050TFunless open ITEMS, "<:utf8", $1
246100TFif ($pattern =~ /^#/u)
24750TFif ($pattern =~ /^# /u) { }
255100TFunless ($pattern =~ /./u)
268100TFunless @{$totals;}
26950TFunless open my $fh, ">:utf8", $path
272100TFif ($file_counts) { }
2740TFunless $totals->[$b] <=> $totals->[$a]
28350TFunless $totals->[$i] > 0
28650TFif ($rule_with_context =~ /^(.*\n)([^\n]+)$/su) { }
291100TF$file_counts ? :
303100TFif $file eq $special->{'file_list'}
304100TFif $file eq $special->{'pr_title_file'}
305100TFif $file eq $special->{'pr_description_file'}
306100TFunless rindex $file, $special->{'commit_messages'}
34650TFif ($timing_report)
36550TFunless $directory =~ /^(.*)$/u
367100TFunless (-e $directory)
371100TFunless (-d $directory)
377100TFunless open NAME, "<:utf8", "$directory/name"
38650TFif ($timing_report)
390100TFif (-e "$directory/skipped")
39950TFif $timing_report
404100TFunless (-s "$directory/stats")
40550TFif $timing_report
410100TFif ($file eq $file_list)
431100TFif (@candidate_totals)
43450TFif (@candidate_list)
43750TFif ($hits)
43950TFif ($candidate_file_counts[$i]++ < $candidate_example_limit)
44550TFif ($candidates[$i] =~ /^#\s+(\S.+)/u)
454100TFif (@forbidden_totals)
45750TFif (@forbidden_list)
46050TFif ($hits)
46950TFif $timing_report
472100TFif ($unknown > $unique)
47650TFunless ($disable_noisy_file)
47750TFif ($kind eq "file")
489100TFunless ($kind =~ /^file/u and -s "$directory/unknown")
495100TFunless $token =~ /./u
497100TFunless defined $CheckSpelling::SpellingCollator::letter_map{$char}
499100TFif defined $CheckSpelling::SpellingCollator::letter_map{$char}{$key}
50650TFif $timing_report
52550TFif ($context =~ /^(.*?)$(.*)/msu)
52750TFif $details
52950TFunless $context
539100TFif (defined $ENV{'expect'})
549100TFif (-s $early_warnings)
55350TFif should_skip_warning_while_counting($warning)
562100TFunless -s "$directory/warnings"
56350TFunless open NAME, "<:utf8", "$directory/name"
568100TFif ($kind ne 'file-list') { }
572100TFif ($warning =~ /:(\d+):(\d+ \.\.\. \d+): `(.*)`/u) { }
576100TFunless $kind eq "file"
578100TFif log_skip_item($item, $file, $warning, $unknown_word_limit)
57950TFif $kind ne "file"
58250TFif ($warning =~ /\`(.*?)\` in line \(token-is-substring\)/u)
5830TFif skip_item($1)
58750TFif should_skip_warning($warning, $code)
59350TFunless $warning =~ s/^:(\d+)/:1/u
595100TFif ($warning =~ /:(\d+ \.\.\. \d+): `(.*)`/u)
59950TFif skip_item($item)
60050TFif (defined $unknown_file_word_limit)
601100TFif ++$unknown_file_word_count{$item} > $unknown_file_word_limit
604100TFif should_skip_warning_while_counting($warning)
61350TFif should_skip_warning_while_counting($warning)
616100TFif (defined $unknown_word_limit)
61950TFunless $warning_count >= $unknown_word_limit
6220TFif should_skip_warning_while_counting($warning)
628100TFif (%counters)
644100TFif (scalar @words > 1) { }
64550TFunless length $a <=> length $b
661100TFunless /(.*) \((.*)\)/u
664100TFif ($variant eq $key) { }
675100TFif ($_ =~ /$pattern/u) { }
68050TFif (defined $has_canonincal{$canonical_match}) { }
681100TFif s/not a recognized word/ignored because another more general variant ($wrapped) is also in expect/u
682100TFif s/unrecognized-spelling/ignored-expect-variant/u
6840TFif s/is not a recognized word/should be replaced by the more general variant ($wrapped)/u
6850TFif s/unrecognized-spelling/update-expect-variant/u
687100TFunless $print
689100TFunless /\(((?:\w+-)+\w+)\)$/u
690100TFif $1 eq "unrecognized-spelling"