]> git.donarmstrong.com Git - perltidy.git/commitdiff
do not allow -wc and -lp together, can cause bugs
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 8 Sep 2020 18:21:42 +0000 (11:21 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 8 Sep 2020 18:21:42 +0000 (11:21 -0700)
lib/Perl/Tidy/Formatter.pm

index 512a74252db566e4a0f6f893412c083e40bf7f43..3c8bd757c4d7e468a23b271a2c24a9819261a6ad 100644 (file)
@@ -6002,6 +6002,13 @@ with these flags.
 EOM
             $rOpts->{'line-up-parentheses'} = 0;
         }
+
+        if ( $rOpts->{'whitespace-cycle'} ) {
+            Warn(<<EOM);
+Conflict: -wc cannot currently be used with the -lp option; ignoring -wc
+EOM
+            $rOpts->{'whitespace-cycle'} = 0;
+        }
     }
 
     # At present, tabs are not compatible with the line-up-parentheses style