Skip to content

Tiny one-function files; file-per-concern splits ​

Files and folders: one of the ways AI coding agents bloat software, from lessloc's pattern catalog. lessloc catches it as tiny-file and new-files.

What makes tiny one-function files and file-per-concern splits a bad practice? ​

The standard that calls it a bad practice: Ousterhout: Shallow Module.

What does lessloc do about tiny one-function files and file-per-concern splits? ​

lessloc catches it as tiny-file and new-files.

  • tiny-file (tier 2): A new code file under 10 code lines.
  • new-files (tier 4): The change adds more than maxNewFiles new code files.

The other patterns in Files and folders:

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