Skip to content

structure/long-files

Checks the code line count of each file against the limit for its language.

Part of the structure configuration, at the all level. It runs at the commit stage, once per scope. gspot runs this check itself.

A long file hides independent responsibilities from the reader.

Split the file by responsibility, or raise limits.<language>.file_lines with a reason.

A Python file over its line limit reports the count. Split it by responsibility.

Turn it off for some files, with a reason:

gspot ignore structure/long-files --paths "<glob>" --reason "<why>"