]> git.donarmstrong.com Git - perltidy.git/commitdiff
reduce max_mccabe
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 3 Feb 2023 22:09:59 +0000 (14:09 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 3 Feb 2023 22:09:59 +0000 (14:09 -0800)
The Formatter routines with highest McCabe values are currently these.
It is difficult to reduce them without significantly slowing processing.
set_bond_strengthws 121
grind_batch_of_CODE 119
set_comma_breakpoints_final 119
set_whitespace_flags 117
process_line_inner_loop 114
break_lines_inner_loop 113
set_vertical_tightness_flags 104
weld_nested_containers 101

.perlcriticrc

index 68a7829dbb7b19229283591879259fea6e73103f..c3ad3778b2a9e3795c11f4e1f53a94f441dd64ef 100644 (file)
@@ -76,11 +76,9 @@ short_subroutine_statements = 2
 
 # This policy is very useful in locating complex code which might benefit from
 # simplification.  The max value has to be set rather high here because there
-# are some routines in Formatter.pm with high mccabe values. In particular,
-# sub "check_options" has a value of 133 but is a very straightforward sub.
-# Nothing would be gained by modifying it.
+# are some routines in Formatter.pm with high mccabe values.
 [Subroutines::ProhibitExcessComplexity]
-max_mccabe=140
+max_mccabe=125
 
 # This policy can be very helpful for locating complex code, but sometimes
 # deep nests are the best option, especially in error handling and debug