You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line length linter, used to enforce line length in files.
Support for only checking go files.
Installation
$ go get github.com/walle/lll/...
Usage
usage: lll [--maxlength MAXLENGTH] [--tabwidth TABWIDTH] [--goonly] [--skiplist SKIPLIST] [--vendor] [--files] [--exclude EXCLUDE] [INPUT [INPUT ...]]
positional arguments:
input
options:
--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.
Testing
Use the go test tool.
$ go test -cover
Contributing
All contributions are welcome! See CONTRIBUTING for more
info.
License
The code is under the MIT license. See LICENSE for more
information.