diff --git a/.travis.yml b/.travis.yml index 215d2572edb..1769051582c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,8 @@ script: - ./gradlew test - ./gradlew codeCoverageReport - ./gradlew docs > /dev/null # build the javadoc + - ./gradlew checkstyleMain + - ./gradlew checkstyleTest after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/alchemy/build.gradle b/alchemy/build.gradle index c359a9fb9a8..79388f8f6eb 100644 --- a/alchemy/build.gradle +++ b/alchemy/build.gradle @@ -51,6 +51,7 @@ signArchives { checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/build.gradle b/build.gradle index 278ed990bb1..bff5f8770b9 100644 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,19 @@ javadoc { source = 'src/main/java' } +checkstyle { + ignoreFailures = false +} + +checkstyleMain { + ignoreFailures = false +} + +checkstyleTest { + ignoreFailures = false +} + + task docs(type: Javadoc) { destinationDir = file("$buildDir/docs/all") } @@ -45,8 +58,12 @@ allprojects { subprojects { + checkstyleMain { + ignoreFailures = false + } + checkstyleTest { - ignoreFailures = true + ignoreFailures = false } afterEvaluate { diff --git a/conversation/build.gradle b/conversation/build.gradle index 6ae2f4f4e6a..8144c7cc135 100644 --- a/conversation/build.gradle +++ b/conversation/build.gradle @@ -51,6 +51,7 @@ signArchives { checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/core/build.gradle b/core/build.gradle index e0cce6588b2..d3603ea02f5 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -49,13 +49,10 @@ signArchives { } } -checkstyleTest { - ignoreFailures = true -} checkstyle { configFile = rootProject.file('checkstyle.xml') - ignoreFailures = true + ignoreFailures = false } task testJar(type: Jar) { diff --git a/core/src/main/java/com/ibm/watson/developer_cloud/service/WatsonService.java b/core/src/main/java/com/ibm/watson/developer_cloud/service/WatsonService.java index d1e7e302f21..a6063b671b4 100644 --- a/core/src/main/java/com/ibm/watson/developer_cloud/service/WatsonService.java +++ b/core/src/main/java/com/ibm/watson/developer_cloud/service/WatsonService.java @@ -134,7 +134,7 @@ protected OkHttpClient configureHttpClient() { .build(); builder.connectionSpecs(Arrays.asList(spec, ConnectionSpec.CLEARTEXT)); - + return builder.build(); } diff --git a/core/src/test/java/com/ibm/watson/developer_cloud/util/WaitFor.java b/core/src/test/java/com/ibm/watson/developer_cloud/util/WaitFor.java index b161c2ee557..4120bc59502 100644 --- a/core/src/test/java/com/ibm/watson/developer_cloud/util/WaitFor.java +++ b/core/src/test/java/com/ibm/watson/developer_cloud/util/WaitFor.java @@ -21,7 +21,9 @@ public class WaitFor { - private WaitFor() {} + private WaitFor() { + + } /** * Static method used to wait for a specific condition to be satisfied. diff --git a/dialog/build.gradle b/dialog/build.gradle index 05d7944b9da..89fb4be4299 100644 --- a/dialog/build.gradle +++ b/dialog/build.gradle @@ -49,11 +49,9 @@ signArchives { } } -checkstyleTest { - ignoreFailures = true -} checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } task testJar(type: Jar) { diff --git a/discovery/build.gradle b/discovery/build.gradle index c8f2e26897d..7a7e1f2fa50 100644 --- a/discovery/build.gradle +++ b/discovery/build.gradle @@ -50,12 +50,12 @@ signArchives { } checkstyleTest { - ignoreFailures = true + ignoreFailures = false } checkstyle { configFile = rootProject.file('checkstyle.xml') - ignoreFailures = true + ignoreFailures = false } dependencies { diff --git a/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceTest.java b/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceTest.java index 7020cfc6e4b..9b9a6b2a711 100644 --- a/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceTest.java +++ b/discovery/src/test/java/com/ibm/watson/developer_cloud/discovery/v1/DiscoveryServiceTest.java @@ -73,7 +73,14 @@ import static org.junit.Assert.assertEquals; -import java.io.*; +import java.io.FileReader; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.BufferedWriter; import java.util.HashSet; import java.util.Set; diff --git a/document-conversion/build.gradle b/document-conversion/build.gradle index bd73f24dc49..6a0f685688a 100644 --- a/document-conversion/build.gradle +++ b/document-conversion/build.gradle @@ -51,6 +51,7 @@ signArchives { checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/java-sdk/build.gradle b/java-sdk/build.gradle index 1832b6dba4e..ea81fbae672 100644 --- a/java-sdk/build.gradle +++ b/java-sdk/build.gradle @@ -58,12 +58,12 @@ signArchives { } checkstyleTest { - ignoreFailures = true + ignoreFailures = false } checkstyle { configFile = rootProject.file('checkstyle.xml') - ignoreFailures = true + ignoreFailures = false } task testJar(type: Jar) { diff --git a/language-translation/build.gradle b/language-translation/build.gradle index fe5471c1bd0..90bea4844d4 100644 --- a/language-translation/build.gradle +++ b/language-translation/build.gradle @@ -51,6 +51,7 @@ signArchives { checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/language-translator/build.gradle b/language-translator/build.gradle index e802c516ab0..364ba8e67fa 100644 --- a/language-translator/build.gradle +++ b/language-translator/build.gradle @@ -51,6 +51,7 @@ signArchives { checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/natural-language-classifier/build.gradle b/natural-language-classifier/build.gradle index 8ea18151de4..317d94ae457 100644 --- a/natural-language-classifier/build.gradle +++ b/natural-language-classifier/build.gradle @@ -50,12 +50,12 @@ signArchives { } checkstyleTest { - ignoreFailures = true + ignoreFailures = false } checkstyle { configFile = rootProject.file('checkstyle.xml') - ignoreFailures = true + ignoreFailures = false } dependencies { diff --git a/natural-language-understanding/build.gradle b/natural-language-understanding/build.gradle index 4131fcd4723..7158f4f733d 100644 --- a/natural-language-understanding/build.gradle +++ b/natural-language-understanding/build.gradle @@ -51,6 +51,7 @@ signArchives { checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/personality-insights/build.gradle b/personality-insights/build.gradle index ceaaa4581dd..01ee609fec7 100644 --- a/personality-insights/build.gradle +++ b/personality-insights/build.gradle @@ -51,6 +51,7 @@ signArchives { checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/retrieve-and-rank/build.gradle b/retrieve-and-rank/build.gradle index bee1cb9be16..111a0dfb6aa 100644 --- a/retrieve-and-rank/build.gradle +++ b/retrieve-and-rank/build.gradle @@ -51,6 +51,7 @@ signArchives { checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/speech-to-text/build.gradle b/speech-to-text/build.gradle index 52a1e240f0b..61e34327000 100644 --- a/speech-to-text/build.gradle +++ b/speech-to-text/build.gradle @@ -49,8 +49,13 @@ signArchives { } } +checkstyleTest { + ignoreFailures = false +} + checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/text-to-speech/build.gradle b/text-to-speech/build.gradle index e40e914d0e9..605b3f13293 100644 --- a/text-to-speech/build.gradle +++ b/text-to-speech/build.gradle @@ -51,6 +51,7 @@ signArchives { checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/tone-analyzer/build.gradle b/tone-analyzer/build.gradle index da0897a7adf..479060e5786 100644 --- a/tone-analyzer/build.gradle +++ b/tone-analyzer/build.gradle @@ -51,6 +51,7 @@ signArchives { checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/tradeoff-analytics/build.gradle b/tradeoff-analytics/build.gradle index 34551041b75..52e6ff64f3b 100644 --- a/tradeoff-analytics/build.gradle +++ b/tradeoff-analytics/build.gradle @@ -51,6 +51,7 @@ signArchives { checkstyle { configFile = rootProject.file('checkstyle.xml') + ignoreFailures = false } dependencies { diff --git a/visual-recognition/build.gradle b/visual-recognition/build.gradle index 1be13ac38a5..da3e28a4b8b 100644 --- a/visual-recognition/build.gradle +++ b/visual-recognition/build.gradle @@ -50,12 +50,12 @@ signArchives { } checkstyleTest { - ignoreFailures = true + ignoreFailures = false } checkstyle { configFile = rootProject.file('checkstyle.xml') - ignoreFailures = true + ignoreFailures = false } dependencies {