From 351b30489c2a47f32500abbb7bdc4ea30e37a247 Mon Sep 17 00:00:00 2001 From: Dawid Weiss Date: Mon, 20 Jan 2020 10:10:48 +0100 Subject: [PATCH] LUCENE-9077: Enable javac linting as in ant. TONS of warnings are currently printed. --- gradle/defaults-java.gradle | 15 +++++++++++++-- .../tools/CheckLinksAndAnchors.java | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gradle/defaults-java.gradle b/gradle/defaults-java.gradle index 896b8bb233b..ac0802e6217 100644 --- a/gradle/defaults-java.gradle +++ b/gradle/defaults-java.gradle @@ -5,7 +5,18 @@ allprojects { sourceCompatibility = "11" targetCompatibility = "11" - compileJava.options.encoding = "UTF-8" - compileTestJava.options.encoding = "UTF-8" + tasks.withType(JavaCompile) { + options.encoding = "UTF-8" + options.compilerArgs += [ + "-Xlint", + "-Xlint:-deprecation", + "-Xlint:-serial", + + "-Xdoclint:all/protected", + "-Xdoclint:-missing", + "-Xdoclint:-accessibility", + "-proc:none", // proc:none was added because of LOG4J2-1925 / JDK-8186647 + ] + } } } diff --git a/solr/solr-ref-guide/tools/CheckLinksAndAnchors.java b/solr/solr-ref-guide/tools/CheckLinksAndAnchors.java index fb9ce10e883..7aeb1ed7723 100644 --- a/solr/solr-ref-guide/tools/CheckLinksAndAnchors.java +++ b/solr/solr-ref-guide/tools/CheckLinksAndAnchors.java @@ -78,7 +78,7 @@ import org.jsoup.select.NodeVisitor; * This tool supports 2 command line options: *

*