kucherenko / jscpd

Copy/paste detector for programming source code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicates "tokens" field always set to zero.

lolgab opened this issue · comments

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 -

export function convertStatisticToArray(format: string, statistic: IStatisticRow): string[] {