From: Steve Hancock Date: Tue, 9 Jul 2019 01:59:11 +0000 (-0700) Subject: added warning about conflict of -iob and -boc for rt#130008 X-Git-Tag: 20190915~12 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=050d79bd84232a2b47569a62b7d518afb6743dd9;p=perltidy.git added warning about conflict of -iob and -boc for rt#130008 --- 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'};