tokei icon indicating copy to clipboard operation
tokei copied to clipboard

Julia docstrings count as code instead of as comments

Open ericphanson opened this issue 3 years ago • 1 comments

"this is a docstring"
f(x) = x

"""
    g(x,y)

Another docstring, this time for `g`.
"""
function g end

"""
    h(x,y)

Another docstring, this time for `h`.
"""
h(x,y) = x+y

gives

===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 Julia                   1           16           14            0            2
===============================================================================
 Total                   1           16           14            0            2
===============================================================================

whereas it should have 11 lines of comments and 3 lines of code, by my count.

ericphanson avatar May 03 '21 20:05 ericphanson

I'm not familiar with Julia, but I believe it is likely the same case as Python with #413

Luckily the linked issue mentions a configuration setting you can use to treat doc-comments as comments

CosmicHorrorDev avatar Dec 10 '21 05:12 CosmicHorrorDev