linters(7)
a collection of linters
make install
make uninstall
make test
check for indent style
lis [-s tab|space] [file ...]
The lis
utility prints a set of errors to standard error if there are
lines inside each [file ...]
that don't use [-s]
for indenting.
If [-s]
is not specified, the default value is tab
. If [file ...]
is absent, lis
reads from standard input.
The lis
utility exits 0
on success, and `>0` if an error occurs.
Check for spaces indenting
$ echo " bar" > foo
$ lis foo
:1:1: Spaces detected
Check for tabs indenting
$ echo " bar" > foo
$ lis -s space foo
:1:1: Tabs detected
awk(1)
check for trailing white space characters
lts [file ...]
The lts
utility prints a set of errors to standard error if there are
lines inside each [file ...]
that has trailing tabs or spaces
Check for trailing tabs
$ echo "bar " > foo
$ lts foo
:1:4: Trailing tabs detected
Check for trailing spaces
$ echo "bar " > foo
$ lts foo
:1:4: Trailing spaces detected
awk(1)
check for maximum line length
lml [-l num] [file ...]
The lml
utility prints a set of errors to standard error if there are
lines inside each [file ...]
that exceed num
characters. If num
is not specified, the default value is 72 characters. If [file ... ]
is absent, lml
reads from standard input.
awk(1)
check for final newline
lfn [file ...]
The lfn
utility prints an error to standard error if any [file ...
]
is missing the final newline. If [file ...]
is missing, lfn
reads
from standard input.
The lfn
utility exits 0
on success, and `>0` if an error occurs.
Check for missing final newline
$ echo "bar" > foo
$ printf "baz" >> foo
$ lfn foo
foo: Missing final newline
check for trailing newlines
ltn [file ...]
The ltn
utility prints an error to standard error if any file ...
has trailing newlines. If [file ...]
is missing, ltn
reads from
standard input.
The ltn
utility exits 0
on success, and `>0` if an error occurs
Check for trailing newlines
$ echo "bar" > foo
$ echo "baz" >> foo
$ printf "\n" >> foo
$ ltn foo
foo: Trailing newlines