gocloc icon indicating copy to clipboard operation
gocloc copied to clipboard

[BUG] fix: semantic error in skip duplicated

Open Lincyaw opened this issue 2 years ago • 2 comments

The default operations in gocloc will consider the same files as only one file, which will leads to confusion.

And I find the flag is wrong.

Lincyaw avatar Jul 11 '23 07:07 Lincyaw

Thank you for your pull-request.

First off, by default, gocloc prevents the same content files (checked by md5 checksum) from being counted multiple times. The original purpose of providing the --skip-duplicated option is to skip this duplication check and count even the duplicated ones.

Considering the above, I think the option name --skip-duplicated does not reflect the intended behavior.

Instead of merging this change, I think it would be better to change the option name. For instance, how about changing it to --include-duplicates?

hhatto avatar Jul 12 '23 03:07 hhatto

Hi there! I just came across this as well and was confused because I expected skip-duplicated to not include duplicated files in the output. Which direction is this going to go? Renaming the flag, or changing the code behavior?

deasa avatar Apr 09 '24 15:04 deasa