Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Support SpotBugs #142

Closed
rock3r opened this issue Nov 1, 2018 · 5 comments
Closed

Support SpotBugs #142

rock3r opened this issue Nov 1, 2018 · 5 comments
Labels

Comments

@rock3r
Copy link
Contributor

rock3r commented Nov 1, 2018

With the advent of Gradle 5.0, they are planning to deprecate FindBugs as it's basically abandonware and suggest using SpotBugs instead:

The FindBugs plugin has been deprecated because the project is unmaintained and does not work with bytecode compiled for Java 9 and above. Please consider using the SpotBugs plugin instead.

Source: Gradle 5.0 RC1 release notes

SAP should act accordingly.

@tasomaniac
Copy link
Contributor

tasomaniac commented Dec 17, 2018

Here are more links for future reference:

@tasomaniac
Copy link
Contributor

Did some integration on the branch: https://github.com/novoda/gradle-static-analysis-plugin/tree/taso/spotbugs

At the time I did this, I used version 1.6.5. That still works fine. But putting 1.6.9 now gives the following error 😢

* What went wrong:
Error while evaluating property 'allSource' of task ':app:spotbugsDebugUnitTest'
> path may not be null or empty string. path='null'

The error is kinda cryptic but it looks like it means source is not set correctly.

@tasomaniac
Copy link
Contributor

Also I have problems with tests. Tests cannot find SpotBugsTask and just fails early. It works fine on the sample.

@tasomaniac
Copy link
Contributor

This work that I mentioned above is just garbage since the release of the SpotBugs plugin version 2.0.0. Initially after talking to @mr-archano last year, I tried to make use of the same structure that we have for Findbugs. The reason was that the SpotBugs plugin also uses internal APIs of Gradle anyways.

That takes a lot of assumptions and it seems like the plugin being in development evolves outside of Gradle. There is even a ticket to remove that Internal API usages. spotbugs/spotbugs-gradle-plugin#104

Long story short, I started to do an integration from scratch without copying the Findbugs and other code quality tool integrations.

@tasomaniac
Copy link
Contributor

Done in #209

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

No branches or pull requests

2 participants