This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new cb1f10816c chore: remove SpotBugs verifications
cb1f10816c is described below

commit cb1f10816c4d9983e1e31963823fd6f113abb35e
Author: Vladimir Sitnikov <[email protected]>
AuthorDate: Wed Nov 19 12:13:14 2025 +0300

    chore: remove SpotBugs verifications
    
    SpotBugs is slow, it is problematic, it requires dependency updates,
    it fails like in 
https://github.com/spotbugs/spotbugs-gradle-plugin/issues/1508
---
 build-logic/build-parameters/build.gradle.kts      |  8 ---
 build-logic/verification/build.gradle.kts          |  1 -
 .../build-logic.sonarqube-aggregate.gradle.kts     | 24 --------
 .../main/kotlin/build-logic.spotbugs.gradle.kts    | 71 ----------------------
 .../src/main/kotlin/build-logic.style.gradle.kts   |  3 -
 gradle/verification-metadata.xml                   |  5 --
 6 files changed, 112 deletions(-)

diff --git a/build-logic/build-parameters/build.gradle.kts 
b/build-logic/build-parameters/build.gradle.kts
index 64fee6d0a2..62c02c9a71 100644
--- a/build-logic/build-parameters/build.gradle.kts
+++ b/build-logic/build-parameters/build.gradle.kts
@@ -62,18 +62,10 @@ buildParameters {
     string("jdkTestImplementation") {
         description.set("Vendor-specific virtual machine implementation to use 
testing JMeter (see 
https://docs.gradle.org/8.0/userguide/toolchains.html#selecting_toolchains_by_virtual_machine_implementation)")
     }
-    bool("spotbugs") {
-        defaultValue.set(false)
-        description.set("Run SpotBugs verifications")
-    }
     bool("sonarqube") {
         defaultValue.set(false)
         description.set("Report verification results to Sonarqube")
     }
-    bool("ignoreSpotBugsFailures") {
-        defaultValue.set(false)
-        description.set("Ignore SpotBugs failures")
-    }
     bool("skipAutostyle") {
         defaultValue.set(false)
         description.set("Skip AutoStyle verifications")
diff --git a/build-logic/verification/build.gradle.kts 
b/build-logic/verification/build.gradle.kts
index 2963cab63c..76ee5908f1 100644
--- a/build-logic/verification/build.gradle.kts
+++ b/build-logic/verification/build.gradle.kts
@@ -23,7 +23,6 @@ dependencies {
     api(projects.basics)
     api(projects.buildParameters)
     api("com.github.autostyle:com.github.autostyle.gradle.plugin:4.0")
-    api("com.github.spotbugs:com.github.spotbugs.gradle.plugin:6.0.4")
     api("com.github.vlsi.ide:com.github.vlsi.ide.gradle.plugin:2.0.0")
     
api("com.github.vlsi.gradle-extensions:com.github.vlsi.gradle-extensions.gradle.plugin:2.0.0")
     
api("de.thetaphi.forbiddenapis:de.thetaphi.forbiddenapis.gradle.plugin:3.10")
diff --git 
a/build-logic/verification/src/main/kotlin/build-logic.sonarqube-aggregate.gradle.kts
 
b/build-logic/verification/src/main/kotlin/build-logic.sonarqube-aggregate.gradle.kts
index 9b610ebe67..66fc57247b 100644
--- 
a/build-logic/verification/src/main/kotlin/build-logic.sonarqube-aggregate.gradle.kts
+++ 
b/build-logic/verification/src/main/kotlin/build-logic.sonarqube-aggregate.gradle.kts
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-import com.github.spotbugs.snom.SpotBugsTask
 import jacoco.JacocoAggregateReportSpec
 
 plugins {
@@ -68,26 +67,3 @@ plugins.withId("build-params.jacoco-aggregation") {
         }
     }
 }
-
-subprojects {
-    plugins.withId("com.github.spotbugs") {
-        val spotBugTasks = tasks.withType<SpotBugsTask>().matching {
-            // We don't send spotbugs for test classes
-            !it.name.endsWith("Test")
-        }
-        sonarTask {
-            dependsOn(spotBugTasks)
-        }
-        sonar {
-            properties {
-                property(
-                    "sonar.java.spotbugs.reportPaths",
-                    spotBugTasks.asSequence()
-                        .map {
-                            
it.reports.named("XML").get().outputLocation.asFile.get()
-                        }
-                )
-            }
-        }
-    }
-}
diff --git 
a/build-logic/verification/src/main/kotlin/build-logic.spotbugs.gradle.kts 
b/build-logic/verification/src/main/kotlin/build-logic.spotbugs.gradle.kts
deleted file mode 100644
index 83726b7ea9..0000000000
--- a/build-logic/verification/src/main/kotlin/build-logic.spotbugs.gradle.kts
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import com.github.spotbugs.snom.Confidence
-import com.github.spotbugs.snom.SpotBugsTask
-import com.github.vlsi.gradle.dsl.configureEach
-import org.gradle.language.base.plugins.LifecycleBasePlugin
-
-plugins {
-    id("com.github.spotbugs")
-    id("build-logic.build-params")
-}
-
-spotbugs {
-    // Below statement is for Renovate Bot since it does not support 
toolVersion.set("..") pattern yet
-    val toolVersion = "4.9.8"
-    this.toolVersion.set(toolVersion)
-
-    providers.gradleProperty("spotbugs.version")
-        .takeIf { it.isPresent }
-        ?.let { this.toolVersion.set(it) }
-    reportLevel.set(Confidence.HIGH)
-    ignoreFailures.set(buildParameters.ignoreSpotBugsFailures)
-}
-
-dependencies {
-    constraints {
-        providers.gradleProperty("asm.version")
-            .takeIf { it.isPresent }
-            ?.let {
-                val asmVersion = it.get()
-                spotbugs("org.ow2.asm:asm:$asmVersion")
-                spotbugs("org.ow2.asm:asm-all:$asmVersion")
-                spotbugs("org.ow2.asm:asm-analysis:$asmVersion")
-                spotbugs("org.ow2.asm:asm-commons:$asmVersion")
-                spotbugs("org.ow2.asm:asm-tree:$asmVersion")
-                spotbugs("org.ow2.asm:asm-util:$asmVersion")
-            }
-    }
-}
-
-fun reportsForHumans() = System.getenv()["CI"]?.toBoolean() != true
-
-tasks.configureEach<SpotBugsTask> {
-    group = LifecycleBasePlugin.VERIFICATION_GROUP
-    if (!buildParameters.spotbugs) {
-        description = "$description (skipped by default, to enable it add 
-Pspotbugs)"
-    }
-    reports {
-        // xml goes for SonarQube, so we always create it just in case
-        create("xml")
-        if (reportsForHumans()) {
-            create("html")
-        }
-    }
-    enabled = buildParameters.spotbugs
-}
diff --git 
a/build-logic/verification/src/main/kotlin/build-logic.style.gradle.kts 
b/build-logic/verification/src/main/kotlin/build-logic.style.gradle.kts
index 34248aa07b..4ecf9ca094 100644
--- a/build-logic/verification/src/main/kotlin/build-logic.style.gradle.kts
+++ b/build-logic/verification/src/main/kotlin/build-logic.style.gradle.kts
@@ -42,9 +42,6 @@ plugins.withId("java-base") {
     if (buildParameters.enableErrorprone) {
         apply(plugin = "build-logic.errorprone")
     }
-    if (buildParameters.spotbugs) {
-        apply(plugin = "build-logic.spotbugs")
-    }
     if (buildParameters.coverage) {
         apply(plugin = "build-logic.jacoco")
     }
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index d04e302d20..d42e615244 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -295,11 +295,6 @@
             <sha256 
value="dc0e8e782ba0dac5c4d0d8678081c11380a5c793b3c46f2d0f8d242d1733b62b" 
origin="Generated by Gradle" reason="Artifact is not signed"/>
          </artifact>
       </component>
-      <component group="com.github.spotbugs" 
name="com.github.spotbugs.gradle.plugin" version="6.0.4">
-         <artifact name="com.github.spotbugs.gradle.plugin-6.0.4.pom">
-            <sha256 
value="f029abeb54aa13d5631ece27f58f2e20039cb28b9ce3b1b314947af5b06d8a65" 
origin="Generated by Gradle" reason="Artifact is not signed"/>
-         </artifact>
-      </component>
       <component group="com.github.vlsi.crlf" 
name="com.github.vlsi.crlf.gradle.plugin" version="2.0.0">
          <artifact name="com.github.vlsi.crlf.gradle.plugin-2.0.0.pom">
             <sha256 
value="fdd676d789d97e249bb312568659343e40bb68ab2cc7bb355e5f925a71a2e67d" 
origin="Generated by Gradle" reason="Artifact is not signed"/>

Reply via email to