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

Run PMD by default #106

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Run PMD by default #106

wants to merge 4 commits into from

Conversation

newtork
Copy link
Contributor

@newtork newtork commented Oct 18, 2024

  • Make the code quality related plugins runnable from sub modules.
  • Enable PMD by default

Sample output:

mvn clean install -f core

[...]

[INFO] --- pmd:3.25.0:pmd (pmd) @ core ---
[INFO] PMD version: 7.3.0
[INFO] Rendering content with org.apache.maven.skins:maven-fluido-skin:jar:2.0.0-M9 skin
[INFO] 
[INFO] <<< pmd:3.25.0:check (default) < :pmd @ core <<<
[INFO] 
[INFO] 
[INFO] --- pmd:3.25.0:check (default) @ core ---
[WARNING] PMD Failure: com.sap.ai.sdk.core.AiCoreDestination:25 Rule:LocalVariableCouldBeFinal Priority:3 Local variable 'destination' could be declared final.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  21.686 s
[INFO] Finished at: 2024-10-18T12:45:48+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.25.0:check (default) on project core: PMD 7.3.0 has found 1 violation. For more details see: C:\SAPDevelop\ai-sdk-java\core\target\pmd.xml -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Copy link
Member

@MatKuhr MatKuhr left a comment

Choose a reason for hiding this comment

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

LGTM

However, the GH pipeline will now run the PMD check twice. Also, the other plugins (checkstyle, maybe more?) still won't run locally.

WDY think, should we make it consistent? Or was there a specific reason to only change it for PMD?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants