From: Steve Hancock Date: Thu, 5 Oct 2023 23:46:49 +0000 (-0700) Subject: add checks to verify correct sequence numbers X-Git-Tag: 20230912.03~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4bb418ec598705e27323a96345f7e7e39a6ffa27;p=perltidy.git add checks to verify correct sequence numbers --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 3eac54e5..94ed836a 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -5876,8 +5876,27 @@ EOM # Save starting seqno to identify sequence method: # New method starts with 2 and has continuous numbering - # Old method starts with >2 and may have gaps - if ( !defined($initial_seqno) ) { $initial_seqno = $seqno } + # Old method (NOT USED) starts with >2 and may have gaps + if ( !defined($initial_seqno) ) { + $initial_seqno = $seqno; + + # Be sure that sequence numbers start with 2. If not, + # there is a programming error in the tokenizer. + if ( $initial_seqno ne 2 ) { + Fault(<