priv-kweihmann/multimetric

Multimetric calculcation incorrect

Opened this issue · 3 comments

Multimetric is calculating incorrectly when the comments are added """ in this format. Pls advise what is the logic and how it is calculating.

This one we have noticed in python files

We see LOC is giving different values and we are unable to find out how this is done.

Regards,

Please provide a sample set and what suppose to be wrong about the output.
LOC is calculated in https://github.com/priv-kweihmann/multimetric/blob/master/multimetric/cls/metric/loc.py using pygments tokens - so if you think there is something wrong, feel free to write a patch

@prajeeshkozhisseri is it possible for you to try out multiple pieces of code and see what other tokens needs to be added into the mix? That would be extremely useful.

Also to @priv-kweihmann could you brief me on tokens, and may how it addresses indent-based languages?

@BrandonKMLee this tool is using https://pygments.org for tokenizing - so all languages supported by pygments should work here as well. I just tested it with C/C++. python, javascript and ruby, so there might be a few adjustments per language needed.