Skip to content

Add flag to skip comments from duplication analyses - #69

Merged
DMarinhoCodacy merged 4 commits into
masterfrom
add-skip-comments
Aug 6, 2026
Merged

Add flag to skip comments from duplication analyses#69
DMarinhoCodacy merged 4 commits into
masterfrom
add-skip-comments

Conversation

@DMarinhoCodacy

Copy link
Copy Markdown
Contributor

No description provided.

@codacy-production

codacy-production Bot commented Aug 6, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 2 duplication

Metric Results
Complexity 0
Duplication 2

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

While the PR implements the requested --skip-comments flag, it also introduces an undocumented and hardcoded 150kb file size limit (--max-size). This change was not mentioned in the PR title or description and could lead to large files being silently ignored during duplication analysis. Codacy reports the PR is up to standards, but the lack of tests for the new command-line arguments and the empty PR description are concerns that should be addressed before merging.

About this PR

  • Scope misalignment: The PR title mentions skipping comments, but the implementation also adds a hardcoded '--max-size' limit of 150kb. This additional logic should be documented or made configurable to avoid unexpected behavior in projects with large files.
  • The PR description is empty. Please provide context for the changes, specifically explaining the inclusion of the hardcoded 150kb size limit which was not part of the PR title.

Test suggestions

  • Missing recommended test scenario: Verify that the jscpd command includes the '--skip-comments' flag when executed.
  • Missing recommended test scenario: Verify that the jscpd command includes the '--max-size' flag with the value '150kb'.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Missing recommended test scenario: Verify that the jscpd command includes the '--skip-comments' flag when executed.
2. Missing recommended test scenario: Verify that the jscpd command includes the '--max-size' flag with the value '150kb'.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread src/main/scala/com/codacy/duplication/jscpd/Jscpd.scala
@DMarinhoCodacy
DMarinhoCodacy merged commit b23b094 into master Aug 6, 2026
6 checks passed
@DMarinhoCodacy
DMarinhoCodacy deleted the add-skip-comments branch August 6, 2026 16:40
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.

2 participants