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

Identical Files in Different Folders Not Detected as 100% Duplicates #732

Open
Sharashchandra opened this issue Feb 22, 2025 · 0 comments
Open

Comments

@Sharashchandra
Copy link

Describe the bug
jscpd does not detect 100% duplicated lines between identical files in different folders, even when using the --skipLocal option. The output shows only partial duplication (50%) instead of 100%.

To Reproduce
Steps to reproduce the behavior:

  1. Create two folders: test and test_2.

  2. Copy the same file into both folders. Example file (test_file.py):

    import pandas as pd
    
    df = pd.read_csv("file.csv")
    print(df.shape)
  3. Run the following command:

    jscpd test/ test_2/ --min-tokens 1 --min-lines 1 --max-lines 10000000000000000 --max-size 1000000000000000000 --skipLocal
  4. Observe the output (attached screenshot).

Expected behavior
Since both files are identical, I expected jscpd to report 100% duplicated lines, but instead, it detects only 50% duplication.

Screenshots

Image

Desktop (please complete the following information):

  • OS: macOS
  • OS Version: 14.7
  • NodeJS Version: 22.14.0
  • jscpd Version: 4.0.5

Additional context

  • Is this the expected behavior?
  • Am I missing a configuration option to ensure 100% duplication detection?
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

No branches or pull requests

1 participant