https://github.com/walle/lll
Line length linter
https://github.com/walle/lll
Last synced: 14 days ago
JSON representation
Line length linter
- Host: GitHub
- URL: https://github.com/walle/lll
- Owner: walle
- License: mit
- Created: 2016-02-28T12:26:36.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-06-04T12:14:44.000Z (almost 3 years ago)
- Last Synced: 2024-11-17T06:40:41.481Z (6 months ago)
- Language: Go
- Size: 34.2 KB
- Stars: 65
- Watchers: 4
- Forks: 9
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/walle/lll)
[](https://codecov.io/github/walle/lll)
[](https://godoc.org/github.com/walle/lll)
[](https://raw.githubusercontent.com/walle/lll/master/LICENSE)
[](http:/goreportcard.com/report/walle/lll)# lll
Line length linter, used to enforce line length in files.
Support for only checking go files.## Installation
```shell
$ go get github.com/walle/lll/...
```## Usage
```shell
usage: lll [--maxlength MAXLENGTH] [--tabwidth TABWIDTH] [--goonly] [--skiplist SKIPLIST] [--vendor] [--files] [--exclude EXCLUDE] [INPUT [INPUT ...]]positional arguments:
inputoptions:
--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.
```shell
$ go test -cover
```## Contributing
All contributions are welcome! See [CONTRIBUTING](CONTRIBUTING.md) for more
info.## License
The code is under the MIT license. See [LICENSE](LICENSE) for more
information.