]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix b1264, -lp formatting under stress
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 23 Nov 2021 19:26:35 +0000 (11:26 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 23 Nov 2021 19:26:35 +0000 (11:26 -0800)
dev-bin/run_convergence_tests.pl.data
lib/Perl/Tidy/Formatter.pm

index 6b88387d2c56a0daa9a41b38ead77adbb904e780..2225dc7eb1264cc23f573eeb7e74c8a912c81e9f 100644 (file)
@@ -8375,6 +8375,33 @@ printf
 --opening-paren-right
 --variable-maximum-line-length
 
+==> b1264.in <==
+#S1
+function(
+          'objectclass'=>['top','person',
+              'organizationalPerson','inetOrgperson'],
+);
+# S2
+function(
+          'objectclass'=>['top','person',
+                          'organizationalPerson',
+                          'inetOrgperson'],
+);
+# S3
+function(
+          'objectclass'=>
+            ['top','person','organizationalPerson',
+                    'inetOrgperson'],
+);
+
+==> b1264.par <==
+--noadd-whitespace
+--break-before-square-bracket=1
+--line-up-parentheses
+--indent-columns=10
+--maximum-line-length=41
+--variable-maximum-line-length
+
 ==> b131.in <==
         unless
           ( open( SCORE, "+>>$Score_File" ) )
index 238493097cff3752630cbb2b98908f30e018404f..7a3dea98108de5baafc5f3a9b541eea812ed4172 100644 (file)
@@ -17710,8 +17710,13 @@ EOM
 
                 # Ignore old breakpoints when under stress.
                 # Fixes b1203 b1204 as well as b1197-b1200.
+                # But not if -lp: fixes b1264, b1265.  NOTE: rechecked with
+                # b1264 to see if this check is still required at all, and
+                # these still require a check, but at higher level beta+3
+                # instead of beta:  b1193 b780
                 if (   $saw_opening_structure
-                    && $levels_to_go[$i_opening] >= $stress_level_beta )
+                    && !$is_lp_container
+                    && $levels_to_go[$i_opening] >= $stress_level_beta + 3 )
                 {
                     $cab_flag = 2;