Skip to content

file-length-limit

Limit source-file length.

Updated View as Markdown

Default severity: note

Limits source-file length. The built-in maximum is 500 lines.

For example, with max-lines = 5, a six-line source file is reported while a five-line file is accepted.

Bad

package example

const first = 1
const second = 2
const third = 3
const fourth = 4

Good

package example

const first = 1
const second = 2
const third = 3

Configuration

Option Type Default Description
max-lines int 500 Maximum number of lines allowed in a source file; zero disables the limit.
[checks.file-length-limit]
max-lines = 500
Navigation

Type to search…

↑↓ navigate↵ selectEsc close