CodingStyle-LinesOfCodeInFile

A file should not contain more than N lines of code

Required inputs: IR

Excessively large files can make code hard to understand and maintain. Try splitting up the code into multiple files bundling individual aspects, which can be understood individually.
Note
Number of lines of code (in a file) is also available as a metric, which can be configured to produce a metric violation when limits are exceeded. This stylecheck rule is available as an alternative to the metric. Further metrics regarding lines of code in routines, etc. are available as metrics as well.

Possible Messages

Key

Text

Severity

Disabled

too_many_lines

File contains too many lines of code (only {} are allowed).

None

False

too_many_lines_with_value

File contains too many lines of code (contains {}, only {} are allowed).

None

False

Options

max_value

max_value : int = 800

Maximum acceptable number of lines of code.
 

show_value

show_value : bool = False

Whether metric value should be displayed.