jscpd
jscpd copied to clipboard
Duplicates "tokens" field always set to zero.
I noticed that the tokens
section in the duplicates
section of the json report is hard-coded to 0
.
It should describe the number of tokens that make the duplicated code.
I would like to contribute on this feature, where can I find the information? I didn't understand what the range field is about. Is it related?
Thank you for the bug report!
Numbers in range
are first symbol position and last symbol position.
I've added tokens
parameters few versions ago and miss some calculations. Will investigate and fix it
I would like to contribute on this feature, where can I find the information?
It would be nice, you can find how to get tokens from statistic here - https://github.com/kucherenko/jscpd/blob/aec15511efe5fffda10960e26a140acb4f704731/packages/finder/src/utils/reports.ts#L62