Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] javadoc warnings not causing failures #5996

Merged
merged 1 commit into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ allprojects {
// see https://discuss.gradle.org/t/add-custom-javadoc-option-that-does-not-take-an-argument/5959
javadoc.options.encoding = 'UTF8'
javadoc.options.addStringOption('Xdoclint:all,-missing', '-quiet')
boolean failOnJavadocWarning = project.ext.has('failOnJavadocWarning') ? project.ext.get('failOnJavadocWarning') : true
if (failOnJavadocWarning) {
javadoc.options.addStringOption('Xwerror', '-quiet')
}
javadoc.options.tags = ["opensearch.internal", "opensearch.api", "opensearch.experimental"]
javadoc.options.addStringOption("-release", targetCompatibility.majorVersion)
}
Expand Down
5 changes: 5 additions & 0 deletions modules/lang-painless/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ opensearchplugin {
classname 'org.opensearch.painless.PainlessModulePlugin'
}

ext {
// Do not fail on `javadoc` warning (ANTLR generated code)
failOnJavadocWarning = false
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrross the lang-painless is a problem at the moment (I will try to find a better way in #4541), but TLDR; - ANTLR generated javadocs are full of warnings, we cannot modify these code

}

testClusters.all {
module ':modules:mapper-extras'
systemProperty 'opensearch.scripting.update.ctx_in_params', 'false'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void setNextDocId(int docId) throws IOException {
}

/**
* Set the {@link #size()} and ensure that the {@link #values} array can
* Set the {@link #size()} and ensure that the internal values array can
* store at least that many entries.
*/
protected void resize(int newSize) {
Expand Down Expand Up @@ -515,7 +515,7 @@ public void setNextDocId(int docId) throws IOException {
}

/**
* Set the {@link #size()} and ensure that the {@link #values} array can
* Set the {@link #size()} and ensure that the internal values array can
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{@link #values} - javadoc complains (for a reason) that private final values is not accessible, makes sense.

* store at least that many entries.
*/
protected void resize(int newSize) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1689,9 +1689,9 @@ static Engine.Searcher wrapSearcher(
* Used with segment replication during relocation handoff, this method updates current read only engine to global
* checkpoint followed by changing to writeable engine
*
* @throws IOException
* @throws InterruptedException
* @throws TimeoutException
* @throws IOException if communication failed
* @throws InterruptedException if calling thread is interrupted
* @throws TimeoutException if timed out waiting for in-flight operations to finish
*
* @opensearch.internal
*/
Expand Down