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 = 4Good
package example
const first = 1
const second = 2
const third = 3Configuration
| 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