Skip to content

Long functions ​

Code longer than it needs to be: one of the ways AI coding agents bloat software, from lessloc's pattern catalog. lessloc catches it as long-function.

What makes long functions a bad practice? ​

The standards that call it a bad practice: Fowler: Long Function; Sonar S138; CWE-1121.

What does lessloc do about long functions? ​

lessloc catches it as long-function.

  • long-function (tier 2): A function over 100 code lines, 20 or more of them written by the change.

The other patterns in Code longer than it needs to be:

Released under the Apache-2.0 license. · llms.txt