GithubHelp home page GithubHelp logo

Comments (8)

pacey avatar pacey commented on May 28, 2024 1

https://github.com/pacey/spotbugs-example

Bumping the plugin version to 1.6.2 in the build.gradle file will cause SpotBugs to show issues, where version 1.6.1 does not.

from spotbugs-gradle-plugin.

KengoTODA avatar KengoTODA commented on May 28, 2024

Hi, could you try to create Minimal, Complete, and Verifiable example? For now we have no information to reproduce your problem.

from spotbugs-gradle-plugin.

pacey avatar pacey commented on May 28, 2024

I'll try and find time today to throw an example project together

from spotbugs-gradle-plugin.

KengoTODA avatar KengoTODA commented on May 28, 2024

With the following patch, I could find a SE_NO_SERIALVERSIONID in test case.

com.github.pacey.SampleTest$__spock_feature_0_1_closure1 is Serializable; consider declaring a serialVersionUID

diff --git a/build.gradle b/build.gradle
index 784a0ab..c1e8e6a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,7 +3,7 @@ import com.github.spotbugs.SpotBugsTask
 plugins {
     id 'java'
     id 'groovy'
-    id "com.github.spotbugs" version "1.6.1"
+    id "com.github.spotbugs" version "1.6.4"
 }
 
 group 'com.github.pacey'

from spotbugs-gradle-plugin.

KengoTODA avatar KengoTODA commented on May 28, 2024

I'm sure that it's not problem in spotbugs core, because following patch doesn't reproduce reported issue:

diff --git a/build.gradle b/build.gradle
index 784a0ab..d351f19 100644
--- a/build.gradle
+++ b/build.gradle
@@ -28,4 +28,8 @@ tasks.withType(SpotBugsTask) {
         html.enabled = true
         xml.enabled = false
     }
-}
\ No newline at end of file
+}
+
+spotbugs {
+  toolVersion = '3.1.7'
+}

So problem should exist in gradle plugin itself. I will check these changes between 1.6.1 and 1.6.2.

from spotbugs-gradle-plugin.

KengoTODA avatar KengoTODA commented on May 28, 2024

@pacey in your environment, can you find other issues?

If we can find only SE_NO_SERIALVERSIONID, it could be not bug but expected change introduced by #12. Previously we cannot handle multiple output directories, but 1.6.2 started support for it.

from spotbugs-gradle-plugin.

pacey avatar pacey commented on May 28, 2024

It's mainly just the SE_NO_SERIALVERSIONID because we use the with (object) {} block a lot. But maybe that shouldn't be reported as a bug?

from spotbugs-gradle-plugin.

KengoTODA avatar KengoTODA commented on May 28, 2024

OK, you think it's false positive of SpotBugs core, right? Then I recommend you to issue a ticket at https://github.com/spotbugs/spotbugs/issues It was designed for Java language, so it may lack consideration for other languages like this.

I believe this Gradle plugin itself has no problem; #12 is just working well. Let me close this issue. Thank you! :)

from spotbugs-gradle-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.