Skip to content

Instantly share code, notes, and snippets.

@hiroyuki-sato
Created March 12, 2020 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiroyuki-sato/6e3698cf92ff55ca881bc846e91bfd12 to your computer and use it in GitHub Desktop.
Save hiroyuki-sato/6e3698cf92ff55ca881bc846e91bfd12 to your computer and use it in GitHub Desktop.
spotbugs error
diff --git a/build.gradle b/build.gradle
index b33bc10..8dbf443 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,6 +6,7 @@ plugins {
 //    id "findbugs"
     id "maven-publish"
     id "org.embulk.embulk-plugins" version "0.4.0"
+    id "com.github.spotbugs" version "4.0.2"
 }
 //import com.github.jrubygradle.JRubyExec
 repositories {
@@ -53,6 +54,19 @@ dependencies {
 //        html.enabled = true
 //    }
 //}
+spotbugs {
+    toolVersion = '4.0.0'
+//    sourceSets = [sourceSets.main]
+    reportsDir = file("$project.buildDir/reports/spotbugs")
+    effort = "max"
+    reportLevel = "high"
+    ignoreFailures = false
+}
+//tasks.withType(com.github.spotbugs.snom.SpotBugsTask) { // OK
+tasks.withType(com.github.spotbugs.SpotBugsTask) { // NG
+//  reports.xml.enabled = false
+    reports.html.enabled = true // NG
+}

 //task classpath(type: Copy, dependsOn: ["jar"]) {
 //    doFirst { file("classpath").deleteDir() }
* What went wrong:
A problem occurred evaluating root project 'embulk-parser-jsonpath'.
> Could not get unknown property 'com' for root project 'embulk-parser-jsonpath' of type org.gradle.api.Project.

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