[RFC] checkpatch: Check for the length of functions

From: Manuel Ebner

Date: Wed Jun 24 2026 - 03:53:49 EST


I have been reading coding-style. Chapter 6) is about length and complexity
of functions. I tested if checkpatch checks that - I doesn't. It wouldn't be
too difficult to do so. I have two things in mind: check for the length in
LOC and complexity with number of local variables.

I have figured out how to implement checks for whole files, but not yet
how to check changed lines ( + some lines for context). Is this even possible?

Thanks
Manuel