From 050d79bd84232a2b47569a62b7d518afb6743dd9 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Mon, 8 Jul 2019 18:59:11 -0700 Subject: [PATCH] added warning about conflict of -iob and -boc for rt#130008 --- lib/Perl/Tidy/Formatter.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 6d342c0e..d313c84b 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -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'}; -- 2.39.5