radon icon indicating copy to clipboard operation
radon copied to clipboard

raw metrics of single line docstrings

Open schettino72 opened this issue 6 years ago • 1 comments

First, I have not read the code... just experimenting with some samples. Sorry if I got any wrong conclusion.

I have noticed that single-line docstrings are counted as single_comments but not comments.

The problem is that on "Comment Stats", the C seems to refers to comments so single line docstrings are never include even on C + M. I guess a quick solution would be make:

C = single_comments + non_single_comments

comments should not be used because lines with# is counted both on comments and single_comments.


Going a bit off-topic. IMO a better solution would be to remove the multi count, instead have docstring count that would count lines for both single-line or multi-line docstring. And comments would count just lines with #.

what do you think?

schettino72 avatar Jul 19 '18 10:07 schettino72

I agree, your proposed solution makes a lot of sense. The current implementation is the result of multiple changes that weren't so well thought-out unfortunately. At the moment I'm very busy and I cannot really work on this. However, I will gladly review any PR.

rubik avatar Jul 27 '18 09:07 rubik