From: Steve Hancock Date: Fri, 3 Feb 2023 22:09:59 +0000 (-0800) Subject: reduce max_mccabe X-Git-Tag: 20230309~42 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=bdc51b80759d6e647e1201a6f427b054beb8eccf;p=perltidy.git reduce max_mccabe 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 --- diff --git a/.perlcriticrc b/.perlcriticrc index 68a7829d..c3ad3778 100644 --- a/.perlcriticrc +++ b/.perlcriticrc @@ -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