]> git.donarmstrong.com Git - perltidy.git/commitdiff
Fix error message for multiple conflicting specifications in -wnxl
authorSteve Hancock <perltidy@users.sourceforge.net>
Mon, 22 Mar 2021 01:49:55 +0000 (18:49 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Mon, 22 Mar 2021 01:49:55 +0000 (18:49 -0700)
lib/Perl/Tidy/Formatter.pm
local-docs/BugLog.pod

index d1cda18515c018b97ab7fce4a8d6d0795ee7dec8..9a20b468eae21eba1e76fd6a401013422aa40491 100644 (file)
@@ -1669,18 +1669,21 @@ sub initialize_weld_nested_exclusion_rules {
                 next;
             }
         }
+
+        my $err;
         if ( $pos eq '^' || $pos eq '*' ) {
-            if ( defined( $rflags->[0] ) && $rflags ne $select ) {
-                $msg1 .= " '$item_save'";
+            if ( defined( $rflags->[0] ) && $rflags->[0] ne $select ) {
+                $err = 1;
             }
             $rflags->[0] = $select;
         }
         if ( $pos eq '.' || $pos eq '*' ) {
-            if ( defined( $rflags->[1] ) && $rflags ne $select ) {
-                $msg1 .= " '$item_save'";
+            if ( defined( $rflags->[1] ) && $rflags->[1] ne $select ) {
+                $err = 1;
             }
             $rflags->[1] = $select;
         }
+        if ($err) { $msg2 .= " '$item_save'"; }
     }
     if ($msg1) {
         Warn(<<EOM);
@@ -1690,7 +1693,7 @@ EOM
     }
     if ($msg2) {
         Warn(<<EOM);
-Multiple specifications were encountered in the --weld-nested-exclusion-list for:
+Multiple specifications were encountered in the --weld-nested-exclusion-list at:
 $msg2
 Only the last will be used.
 EOM
index 856f123774a2f15637062980c89cb1b076a4de3f..defb4be28da62a7360be43e8fa7a0d3a6d1cdbc1 100644 (file)
@@ -2,12 +2,19 @@
 
 =over 4
 
+=item B<Fix error message for multiple conflicting specifications in -wnxl>
+
+There was an error in the coding for an error message which checks for
+conflicting requests in the -wnxl parameter.
+
+Fixed 21 Mar 2021.
+
 =item B<Fix issue git #57, Warn_count was not initialized>
 
 This update fixes issue git #57, in which a warning flag was not getting zeroed
 on each new call to perltidy.
 
-19 Mar 2021.
+19 Mar 2021, b6d296a.
 
 =item B<Fix rare problem with combination -lp -wn -naws>