Hope this helps. I wish I'd known this is what you were after, but I
guess it didn't click! This is an area I love and excel at, so I
hoped to put that to use here.
* The colorization flag might help when there are a lot of results.
* By far, the indented line number and preview of the offending lines
is the most useful aspect of lenchk, making it much easier to track
down troublesome lines, especially for the inexperienced.
* I've accounted for `//` lines (C languages), although some like
Javascript, HTML, and CSS I've yet to get around to.
* There's a summary, which is probably pointless, but it might help to
keep track of our progress in getting through the files.
* It's ever-so-slightly more efficient and portable, but ultimately, -
I'd say making it use just /bin/sh would be better, but Bash is
pretty common-place these days, and has features which make lenchk
much cleaner.
Ideally, I'd have written this in Perl, due to the limited lifespan
of this tester, because a shell can only handle so much data before
it starts to chug. I figured, however, that not everyone will have
Perl.
If this commit isn't accepted, no worries, as I'm sure I can repurpose
it for use elsewhere.
Want it, but have issues? Let me know, and I'll get on that ASAP.
Note that I've removed max_length in this commit, to avoid confusion.
I realise it's a built-in, and that its operation can wildly differ,
depending on the shell used, which is why I've added that the sheet is
for the Bash built-in. I'm not sure how this project handles multiple
different tools by the same name; worth looking into, @chubin?
Without knowledge of this, people trying out an Ubuntu- or Debian-based
distribution will be frustrated when trying to use udisksctl(1). I ran
into this situation myself, so discovering this was a relief.