Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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