Skip to content
Line length linter
Branch: master
Clone or download

Build Status Coverage Godoc license Go Report Card


Line length linter, used to enforce line length in files. Support for only checking go files.


$ go get


usage: lll [--maxlength MAXLENGTH] [--tabwidth TABWIDTH] [--goonly] [--skiplist SKIPLIST] [--vendor] [--files] [--exclude EXCLUDE] [INPUT [INPUT ...]]

positional arguments:

  --maxlength MAXLENGTH, -l MAXLENGTH
                         max line length to check for [default: 80]
  --tabwidth TABWIDTH, -w TABWIDTH
                         tab width in spaces [default: 1]
  --goonly, -g           only check .go files
  --skiplist SKIPLIST, -s SKIPLIST
                         list of dirs to skip [default: [.git vendor]]
  --vendor               check files in vendor directory
  --files                read file names from stdin one at each line
  --exclude EXCLUDE, -e EXCLUDE
                         exclude lines that matches this regex
  --help, -h             display this help and exit

Example usage to check only go files for lines more than 100 characters. Excluding lines that contain the words TODO or FIXME. lll -l 100 -g -e "TODO|FIXME" path/to/myproject.

You can also define the flags using environment variables, eg. MAXLENGTH=100 GOONLY=true lll path/to/my/project.


Use the go test tool.

$ go test -cover


All contributions are welcome! See CONTRIBUTING for more info.


The code is under the MIT license. See LICENSE for more information.

You can’t perform that action at this time.