Skip to content

[BUG] fix: semantic error in skip duplicated#68

Open
Lincyaw wants to merge 1 commit intohhatto:masterfrom
Lincyaw:master
Open

[BUG] fix: semantic error in skip duplicated#68
Lincyaw wants to merge 1 commit intohhatto:masterfrom
Lincyaw:master

Conversation

@Lincyaw
Copy link

@Lincyaw Lincyaw commented Jul 11, 2023

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.

@hhatto
Copy link
Owner

hhatto commented Jul 12, 2023

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?

@deasa
Copy link

deasa commented Apr 9, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants