Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-9077: Enable javac linting as in ant. TONS of warnings are currently printed.

Dawid Weiss351b30489c2a
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:
* </p>
* <ul>
- * <li><b>-check-all-relative-links</b><br />
+ * <li><b>-check-all-relative-links</b>
* <p>By default, only relative links to files in the same directory (ie: not startin with
* <code>"../"</code> are checked for existence. This means that we can do a "quick" validatation of
* links to other ref-guide files, but ignore relative links to things outside of the ref-guide --
@@ -86,7 +86,7 @@ import org.jsoup.select.NodeVisitor;
* <em>also</em> check relative links where the path starts with <code>"../"</code>
* </p>
* </li>
- * <li><b>-bare-bones</b><br/>
+ * <li><b>-bare-bones</b>
* <p>By default, this tool assumes it is analyzing Jekyll generated files. If this option is specified,
* then it instead assumes it's checking "bare bones" HTML files...
* </p>