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

Support copy-paste-detector #4

Closed
dovogt opened this issue Apr 4, 2018 · 3 comments
Closed

Support copy-paste-detector #4

dovogt opened this issue Apr 4, 2018 · 3 comments

Comments

@dovogt
Copy link

dovogt commented Apr 4, 2018

Is it possible for the plugin to support CPD (copy-paste-detector)?
https://pmd.github.io/pmd-6.2.0/#cpd

@xvik
Copy link
Owner

xvik commented Apr 4, 2018

There is gradle-cpd-plugin. I can provide integration for it: when the plugin is present, it will be configured (like with animalsniffer plugin). And, I suppose, custom console reporting will be required.

But I will not have time for it too soon, so I suggest you use cpd plugin directly for now.

@dovogt
Copy link
Author

dovogt commented Apr 4, 2018

I use this plugin. I have to configure it separately and make sure that the PMD version is the same.
It would be great if you integrated it.

xvik added a commit that referenced this issue Nov 7, 2019
xvik added a commit that referenced this issue Nov 8, 2019
@xvik
Copy link
Owner

xvik commented Nov 9, 2019

CDP plugin will be supported in the new version. Cpd project is assumed to be applied manually, so quality plugin applies configurations only if plugin exists (no automatic registrations):

  • cpd.toolVersion = quality.pmdVersion
  • cpd.ignoreFailures = !quality.strict
  • cpdCheck.source synchronized with configured sourceSets and exclusions (same scope as all other quality plugins). May be disabled with quality.cpdUnifySources
  • Custom console report (like for other tools)
  • HTML report (generated with style recommended by pmd)
  • cpdCheck always associated with check task

For multi-module projects, it is assumed that cpd plugin will be declared in root project (as plugin author suggests) and quality plugins will be applied in subprojects. In this case, cpd plugin will be also configured. cpdCheck task source will also be affected: each submodule will exclude not needed sources and so for each module cpd "scope" will be the same as for other quality plugins.

Submodule check will depend on root cpdCheck (again, as suggested by plugin author)

In case of multiple cpd tasks declared, each task will have custom console reporting + html report.
But only default cpdCheck task sources are affected.

Cpd configuration supposed to be performed in cpd closure (quality plugin does not affect it)

@xvik xvik closed this as completed Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants