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

Java SDK: Static analysis #159

Open
booniepepper opened this issue Jul 27, 2023 · 1 comment
Open

Java SDK: Static analysis #159

booniepepper opened this issue Jul 27, 2023 · 1 comment
Labels
java-sdk Affects the Java/Kotlin SDK

Comments

@booniepepper
Copy link
Contributor

Consider adding PMD and/or SpotBugs checks to the generated SDK

@booniepepper
Copy link
Contributor Author

Note just adding id 'pmd' to the build.gradle with no other configuration leads to quite a few violations.

> Task :compileJava
Note: /module/src/main/java/dev/openfga/api/invoker/JSON.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :processResources NO-SOURCE
> Task :classes
> Task :jar
> Task :javadoc
> Task :javadocJar
> Task :sourcesJar
> Task :assemble
> Task :compileIntegrationJava
> Task :processIntegrationResources NO-SOURCE
> Task :integrationClasses
> Task :compileTestJava
> Task :processTestResources NO-SOURCE
> Task :testClasses
> Task :pmdIntegration FAILED
> Task :test
> Task :pmdTest FAILED
> Task :pmdMain FAILED

FAILURE: Build completed with 3 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':pmdIntegration'.
> A failure occurred while executing org.gradle.api.plugins.quality.internal.PmdAction
   > 7 PMD rule violations were found. See the report at: file:///module/build/reports/pmd/integration.html

* Try:
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':pmdTest'.
> A failure occurred while executing org.gradle.api.plugins.quality.internal.PmdAction
   > 13 PMD rule violations were found. See the report at: file:///module/build/reports/pmd/test.html

* Try:
> Run with --scan to get full insights.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':pmdMain'.
> A failure occurred while executing org.gradle.api.plugins.quality.internal.PmdAction
   > 641 PMD rule violations were found. See the report at: file:///module/build/reports/pmd/main.html

* Try:
> Run with --scan to get full insights.
==============================================================================

16 actionable tasks: 16 executed
BUILD FAILED in 38s
make[1]: *** [run-in-docker] Error 1
make: *** [build-client-java] Error 2

@rhamzeh rhamzeh added the java-sdk Affects the Java/Kotlin SDK label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java-sdk Affects the Java/Kotlin SDK
Projects
Status: Backlog
Development

No branches or pull requests

2 participants