V Tue, 17 Dec 2019 16:53:04 +0100
Stefan Hundhammer <shundhammer(a)suse.de> napsáno:
On 17.12.19 11:04, Josef Reidinger wrote:
104886 150083 573752
C++ 726 40778 31679 143555
I was tempted to calculate the ratio of real lines of code vs. comment lines
(ignoring blank lines):
comment_ratio = comment_lines / (total_lines - blank_lines)
Then I realized that we have that license header in each file which greatly
distorts such a ratio: That legalese is also considered comment lines. Each
file has a legalese header. But Ruby files tend to be a lot smaller, so there
are more percent of legalese lines.
comment_ratio = (comment_lines - legalese_lines) /
(total_lines - blank_lines - legalese_lines)
Any chance of figuring out the real sizes without the legalese?
I am not sure if that tool support e.g. plugin so we can extend it by some trick to
recognize that legalese lines.
I am really curious how well documented our stuff is.
Well, not sure if we can measure quality of documentation (I worry we will need to test it
on real people), but we can easily for ruby code measure quantity of documented public
yardoc itself support it and you can define in Rakefile threshold to ensure that it does
Output looks like:
jreidinger@linux-vvcf:~/prace/yast/bootloader> rake check:doc
Modules: 3 ( 2 undocumented)
Classes: 66 ( 7 undocumented)
Constants: 32 ( 27 undocumented)
Attributes: 25 ( 0 undocumented)
Methods: 299 ( 166 undocumented)
There are even some services that can be attached to github repo that generate more
So definitively we have a ways to measure it and what is the best, we do not need to write
it ourself :)
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
To contact the owner, e-mail: yast-devel+owner(a)opensuse.org