Skip to content

[core,cli] Move some tests into pmd-cli#4235

Merged
adangel merged 15 commits into
pmd:pmd/7.0.xfrom
oowekyala:clem.pmd7-cpd-deprecations
Jan 26, 2023
Merged

[core,cli] Move some tests into pmd-cli#4235
adangel merged 15 commits into
pmd:pmd/7.0.xfrom
oowekyala:clem.pmd7-cpd-deprecations

Conversation

@oowekyala

@oowekyala oowekyala commented Nov 26, 2022

Copy link
Copy Markdown
Member

Describe the PR

  • Remove some things that were deprecated in [core] Use PicoCli and unify PMD usage under a single main #4059
  • Move the CLI tests that were left in language modules into the cli module
    • Accordingly, BaseCLITest and BaseCPDCLITest are removed from the pmd-test module
  • Remove the CPD CLI from pmd-core - now the pmd-cli module is the only CLI for CPD.
    • CPD.main now throws an UnsupportedOperationException
    • Some of the CPD tests of pmd-core are moved to the CLI module
  • Remove some of the deprecated APis from the CPD package, like the old Renderer and CPDRenderer interfaces.

Related issues

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

@adangel adangel added this to the 7.0.0 milestone Dec 1, 2022
Comment thread pmd-cli/src/test/java/net/sourceforge/pmd/cli/BaseCliTest.java Outdated
Comment thread pmd-cli/src/test/java/net/sourceforge/pmd/cli/ForceLanguageCliTest.java Outdated
@ghost

ghost commented Jan 8, 2023

Copy link
Copy Markdown
2 Messages
📖 Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Full report
📖 Compared to master:
This changeset changes 49641 violations,
introduces 33909 new violations, 1446 new errors and 0 new configuration errors,
removes 195793 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 6 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 49641 violations,
introduces 33909 new violations, 1446 new errors and 0 new configuration errors,
removes 195793 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 4 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 49641 violations,
introduces 33909 new violations, 1446 new errors and 0 new configuration errors,
removes 195793 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 4 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 49641 violations,
introduces 33909 new violations, 1446 new errors and 0 new configuration errors,
removes 195793 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 49543 violations,
introduces 33909 new violations, 1446 new errors and 0 new configuration errors,
removes 195793 violations, 4 errors and 7 configuration errors.
Full report

Generated by 🚫 Danger

@adangel adangel added the in:cli Affects the PMD Command Line Interface label Jan 13, 2023
@adangel adangel changed the title [core] [cli] Move some tests into pmd-cli [core,cli] Move some tests into pmd-cli Jan 13, 2023

@adangel adangel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR!

I think, we need to deprecate some things on master first.

Additionally, since we now removed some classes, we need to update maven-pmd-plugin, as the dogfood run is failing now with:

  [INFO] --- maven-pmd-plugin:3.18.0-pmd7-SNAPSHOT:cpd (cpd) @ pmd ---
  Warning:  Error injecting: org.apache.maven.plugins.pmd.CpdReport
  java.lang.NoClassDefFoundError: net/sourceforge/pmd/cpd/renderer/CPDRenderer

-> https://github.com/apache/maven-pmd-plugin/tree/pmd7

Comment thread pmd-cli/src/main/java/net/sourceforge/pmd/cli/internal/CliExitCode.java Outdated
Comment thread pmd-cli/src/test/java/net/sourceforge/pmd/cli/ForceLanguageCliTest.java Outdated
Comment thread pmd-cli/src/test/java/net/sourceforge/pmd/cli/PmdCliTest.java Outdated
Comment thread pmd-cli/src/test/java/net/sourceforge/pmd/cli/PmdCliTest.java Outdated
Comment thread pmd-cli/src/test/java/net/sourceforge/pmd/cli/PmdCliTest.java
Comment thread pmd-core/src/test/java/net/sourceforge/pmd/cli/CoreCliTest.java
Comment thread pmd-test/src/main/java/net/sourceforge/pmd/cli/BaseCLITest.java
When running the tests under cygwin, initializing the progressbar fails: The tests stall when executing "tty.exe" to determine the terminal type.
@adangel adangel mentioned this pull request Jan 23, 2023
55 tasks
@oowekyala oowekyala marked this pull request as ready for review January 24, 2023 20:41
@adangel adangel self-assigned this Jan 26, 2023

@adangel adangel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! I'll merge this soon...

@adangel adangel merged commit 6ff8bda into pmd:pmd/7.0.x Jan 26, 2023
@oowekyala oowekyala deleted the clem.pmd7-cpd-deprecations branch January 26, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in:cli Affects the PMD Command Line Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants