]> git.donarmstrong.com Git - perltidy.git/commitdiff
added warning about conflict of -iob and -boc for rt#130008
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 9 Jul 2019 01:59:11 +0000 (18:59 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 9 Jul 2019 01:59:11 +0000 (18:59 -0700)
lib/Perl/Tidy/Formatter.pm

index 6d342c0e819bffe2e77e9fd58b4f976f48d2f456..d313c84b064a93c190c2ef2155f16a1391d06394 100644 (file)
@@ -5673,6 +5673,25 @@ EOM
         '?' => ':',
     );
 
+    if ( $rOpts->{'ignore-old-breakpoints'} ) {
+        if ( $rOpts->{'break-at-old-method-breakpoints'} ) {
+            Warn("Conflicting parameters: -iob and -bom; -bom will be ignored\n"
+            );
+        }
+        if ( $rOpts->{'break-at-old-comma-breakpoints'} ) {
+            Warn("Conflicting parameters: -iob and -boc; -boc will be ignored\n"
+            );
+        }
+
+       # Note: there are additional parameters that can be made inactive by
+       # -iob, but they are on by default so we would generate excessive
+       # warnings if we noted them. They are:
+        # $rOpts->{'break-at-old-keyword-breakpoints'}
+        # $rOpts->{'break-at-old-logical-breakpoints'}
+        # $rOpts->{'break-at-old-ternary-breakpoints'}
+        # $rOpts->{'break-at-old-attribute-breakpoints'}
+    }
+
     # frequently used parameters
     $rOpts_add_newlines          = $rOpts->{'add-newlines'};
     $rOpts_add_whitespace        = $rOpts->{'add-whitespace'};