tokei
tokei copied to clipboard
Julia docstrings count as code instead of as 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.
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