go-common/vendor/github.com/tsuna/gohbase/check_line_len.awk
2019-04-22 02:59:20 +00:00

23 lines
264 B
Awk

#!/usr/bin/awk -f
BEGIN {
max = 100;
}
# Expand tabs to 4 spaces.
{
gsub(/\t/, " ");
}
length() > max {
errors++;
print FILENAME ":" FNR ": Line too long (" length() "/" max ")";
}
END {
if (errors >= 125) {
errors = 125;
}
exit errors;
}