LexaCount - Count lines of code

Wrote this small utility in C for counting lines of code which includes: - Line counting which excludes comments and blank lines - Option to exclude lines containing only brackets or parenthesis - Formatting as text/tables - Bulk file names loading from a file name list https://github.com/anic17/LexaCount/releases
GitHub
Releases · anic17/LexaCount
LexaCount is a utility to count source lines of code - anic17/LexaCount
24 Replies
Dumb Bird
Dumb Bird12mo ago
Line counting which excludes comments and blank lines
Please make it an option to include these, by default it should exclude though
Option to exclude lines containing only brackets or parenthesis
To me this relates with the same thing above, as it's not really sloc imo, as a line with just a { or }
Formatting as text/tables
If the terminal is too small to render a table properly how is that handled
Bulk file names loading from a file name list
Do you mean going through a file that has file names in it? To me it just makes sense to have the cli take in as many files as a person wants (which it seems to do, so I don't understand what you mean here) -------- 1. Would it be possible to add color? I think it's a cute little idea that could be toggled with a flag, but I think it would help make LexaCount stand out from other loc utilities 2. Could you add a screenshot of the final output in the readme? Nothing in the readme shows what the table actually looks like 3. I think showing some stats would be pretty neat. Like for example: - total line count - # of blank lines - # of code comments - # of true code lines (so just sloc, ignoring blank lines, comments, and etc) After running the program it does seem to have some of these, although that was never touched on in the readme (heres where adding that screenshot would be nice)
keith
keith12mo ago
@earth's bird damn, you went off didn't you
anic17
anic17OP12mo ago
The table displays exactly what you mentioned I can easily add an option to include blank lines and comments as part of the code, that's a quick thing The CLI takes as many files as the person wants and also as many list files as they want I believe it's helpful to be able to load a bunch of filenames from a list. Maybe I should add more examples and have a more detailed readme to show clearly what it can do. As per the color, I can think of this, shouldn't either be too hard to implement
Dumb Bird
Dumb Bird12mo ago
Lol, wasn't the intention I just like giving feedback Then this should be mentioned in the readme or shown by a screenshot Screenshots are much more attention catching then text too, so I think a screenshot would be best
keith
keith12mo ago
I think it needs a clearer description of what a sloc is. In my personal opinion, if a line is deleted and this affects how the program compiles, its a sloc. If deleting it does nothing, then it's not a sloc
Dumb Bird
Dumb Bird12mo ago
I also think that having a profomance test would be nice like loc does
anic17
anic17OP12mo ago
will add one, it is more descriptive
Dumb Bird
Dumb Bird12mo ago
Still not added, I'm sure you have lots of other things going on. Just letting you know I'm still watching this project!
anic17
anic17OP12mo ago
yeah sorry I've been busy this week and will be quite inactive the next two weeks, lots of irl stuff going on
Dumb Bird
Dumb Bird12mo ago
Ah, I hope all is well
anic17
anic17OP12mo ago
lots of school work
Dumb Bird
Dumb Bird12mo ago
Drats, that sucks. I understand that
anic17
anic17OP12mo ago
done now, let me know what you think
Dumb Bird
Dumb Bird12mo ago
I think it should be the first thing shown Rather than the last thing The addition of the screenshot is nice though
anic17
anic17OP12mo ago
Maybe
Dumb Bird
Dumb Bird12mo ago
I think LexaCount's table leaves some stuff to be desired though Well it being attention grabbing I find it's best to have it be the first thing seen
anic17
anic17OP12mo ago
Changed, let me know now
Dumb Bird
Dumb Bird12mo ago
Much better imo
anic17
anic17OP12mo ago
What would you add?
Dumb Bird
Dumb Bird12mo ago
It's hard to put my finger on but really the design of the table is well. A bit nasty. The separation of the final total should be more obvious. The headers: File, Code lines, Blank, Comments, Brackets only, should all be more seperated from the data in the table If that makes sense Visually it's lacking, information wise I think it's good
Dumb Bird
Dumb Bird12mo ago
No description
Dumb Bird
Dumb Bird12mo ago
Here are some examples of tables in the terminal I think you could get inspired from
No description
No description
No description
No description
Dumb Bird
Dumb Bird12mo ago
Some do use unicode but that's less of the point I was trying to make, I think they all look good and feel right They all have a good seperatation of the headers from the data
Dumb Bird
Dumb Bird12mo ago
For lexacount I almost prefer the minimal style of something like this
No description
Want results from more Discord servers?
Add your server