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

jscpd looks for code duplicate in images #3966

Closed
fungiboletus opened this issue Mar 1, 2023 · 10 comments · Fixed by #5041
Closed

jscpd looks for code duplicate in images #3966

fungiboletus opened this issue Mar 1, 2023 · 10 comments · Fixed by #5041
Labels
enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label

Comments

@fungiboletus
Copy link

fungiboletus commented Mar 1, 2023

Describe the bug

jscpd looks for code duplicate in images, which takes some time with very little chances to find duplicates.

Expected behavior

Perhaps filenames with extensions from common binary files should be ignored by jscpd by default.

@fungiboletus fungiboletus added the bug Something isn't working label Mar 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2023

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

If you're a maintainer, you can stop the bot to mark this issue as stale in the future by adding the O: backlog 🤖 label`.

@github-actions github-actions bot added O: stale 🤖 Stale issue/pr and removed O: stale 🤖 Stale issue/pr labels Apr 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

If you're a maintainer, you can stop the bot to mark this issue as stale in the future by adding the O: backlog 🤖 label`.

@github-actions github-actions bot added O: stale 🤖 Stale issue/pr and removed O: stale 🤖 Stale issue/pr labels May 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2023

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

If you're a maintainer, you can stop the bot to mark this issue as stale in the future by adding the O: backlog 🤖 label`.

@github-actions github-actions bot added O: stale 🤖 Stale issue/pr and removed O: stale 🤖 Stale issue/pr labels Jun 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

If you're a maintainer, you can stop the bot to mark this issue as stale in the future by adding the O: backlog 🤖 label`.

@github-actions github-actions bot added O: stale 🤖 Stale issue/pr and removed O: stale 🤖 Stale issue/pr labels Jul 3, 2023
@zkoppert zkoppert added the O: backlog 🤖 Backlog, stale ignores this label label Jul 5, 2023
@ferrarimarco
Copy link
Collaborator

@fungiboletus Hi! Thanks for this report.

Can you please share more about how you're running and configuring super-linter, so we can reproduce this?

@fungiboletus
Copy link
Author

I believe I used the default configuration from the getting started section in the readme at the time of the issue. My repository had some images in it.

@ferrarimarco
Copy link
Collaborator

Thanks for following up. For now, I'm going to close this because we don't have a reproduction case.

@ferrarimarco ferrarimarco closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023
@fungiboletus
Copy link
Author

Here you go: https://github.com/fungiboletus/superlint-jscpd-images

It's an example repository with an image and the default configuration from the getting started section in the readme.

The .webp image is processed by jscpd (and also gitleaks and textlint).

image

@ferrarimarco ferrarimarco reopened this Dec 14, 2023
@ferrarimarco
Copy link
Collaborator

@fungiboletus thanks for this example.

I think this is a fair request. We should exclude at least the same files we exclude when using find:

mapfile -t RAW_FILE_ARRAY < <(find "${WORKSPACE_PATH}" \
-not \( -path '*/\.git' -prune \) \
-not \( -path '*/\.pytest_cache' -prune \) \
-not \( -path '*/\.rbenv' -prune \) \
-not \( -path '*/\.terragrunt-cache' -prune \) \
-not \( -path '*/\.venv' -prune \) \
-not \( -path '*/\__pycache__' -prune \) \
-not \( -path '*/\node_modules' -prune \) \
-not -name ".DS_Store" \
-not -name "*.gif" \
-not -name "*.ico" \
-not -name "*.jpg" \
-not -name "*.jpeg" \
-not -name "*.pdf" \
-not -name "*.png" \
-not -name "*.webp" \
-not -name "*.woff" \
-not -name "*.woff2" \
-not -name "*.zip" \
-type f \
2>&1 | sort)

@ferrarimarco ferrarimarco added enhancement New feature or request and removed bug Something isn't working good first issue labels Dec 14, 2023
@ferrarimarco
Copy link
Collaborator

Given the changes in #5041, this should be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants