Skip to content

Commit aa88b41

Browse files
authored
[Spotless] Applying Google Code Format for core/src/main files #1 (opensearch-project#1930)
* # This is a combination of 9 commits. # This is the 1st commit message: Fix create_index/create_index_with_IOException issue caused by OpenSearch PR change (opensearch-project#1899) * Added setDefaultMediaType for create_index and create_index_with_IOException Signed-off-by: Mitchell Gale <[email protected]> (cherry picked from commit 7b932a7) Signed-off-by: Mitchell Gale <[email protected]> Resolving merge conflicts for pre tag in java docs. Signed-off-by: Mitchell Gale <[email protected]> running spotless check on newly pre tagged javadocs. Signed-off-by: Mitchell Gale <[email protected]> Converts java doc table to proper java doc table. Signed-off-by: Mitchell Gale <[email protected]> Resolving merge conflicts for pre tag in java docs 2 Signed-off-by: Mitchell Gale <[email protected]> running spotless check on newly pre tagged javadocs. Signed-off-by: Mitchell Gale <[email protected]> cherry pick 60c0018 Signed-off-by: Mitchell Gale <[email protected]> Addressed PR comment for table format in AbstractExprValue. Signed-off-by: Mitchell Gale <[email protected]> Removed pre tag from ExpressionReferenceOptimizer. Signed-off-by: Mitchell Gale <[email protected]> Removed pre tag from AstDSL.java Signed-off-by: Mitchell Gale <[email protected]> Removed pre tag from AstDSL.java Signed-off-by: Mitchell Gale <[email protected]> Removed pre tag from SelectExpressionAnalyzer.java Signed-off-by: Mitchell Gale <[email protected]> fixed java doc in QualifiedName.java Signed-off-by: Mitchell Gale <[email protected]> Removing checkstyle test for core and added spotless for relevant directories. Signed-off-by: Mitchell Gale <[email protected]> # This is the commit message #2: Fixing spacing around headers in ExpressionReferenceOptimizer.java SelectExpressionAnalyzer.java Signed-off-by: Mitchell Gale <[email protected]> # This is the commit message #3: Fix breaking changes. Disable some flaky tests in legacy. Signed-off-by: Yury-Fridlyand <[email protected]> (cherry picked from commit 809e656) Signed-off-by: Mitchell Gale <[email protected]> # This is the commit message #4: Resolving merge conflicts for pre tag in java docs. Signed-off-by: Mitchell Gale <[email protected]> # This is the commit message #5: running spotless check on newly pre tagged javadocs. Signed-off-by: Mitchell Gale <[email protected]> # This is the commit message #6: Fixed java doc spelling and improving string concatination. Signed-off-by: Mitchell Gale <[email protected]> # This is the commit message #7: improving string concatination. Signed-off-by: Mitchell Gale <[email protected]> # This is the commit message #8: Improving failure format on some functions. Signed-off-by: Mitchell Gale <[email protected]> # This is the commit message #9: spotless apply and fix of build.gradle Signed-off-by: Mitchell Gale <[email protected]> * parent 496fe8e author Mitchell Gale <[email protected]> 1691080710 -0700 committer Mitchell Gale <[email protected]> 1691080766 -0700 Fix create_index/create_index_with_IOException issue caused by OpenSearch PR change (opensearch-project#1899) * Added setDefaultMediaType for create_index and create_index_with_IOException Signed-off-by: Mitchell Gale <[email protected]> (cherry picked from commit 7b932a7) Signed-off-by: Mitchell Gale <[email protected]> Resolving merge conflicts for pre tag in java docs. Signed-off-by: Mitchell Gale <[email protected]> running spotless check on newly pre tagged javadocs. Signed-off-by: Mitchell Gale <[email protected]> Converts java doc table to proper java doc table. Signed-off-by: Mitchell Gale <[email protected]> Resolving merge conflicts for pre tag in java docs 2 Signed-off-by: Mitchell Gale <[email protected]> running spotless check on newly pre tagged javadocs. Signed-off-by: Mitchell Gale <[email protected]> cherry pick 60c0018 Signed-off-by: Mitchell Gale <[email protected]> Addressed PR comment for table format in AbstractExprValue. Signed-off-by: Mitchell Gale <[email protected]> Removed pre tag from ExpressionReferenceOptimizer. Signed-off-by: Mitchell Gale <[email protected]> Removed pre tag from AstDSL.java Signed-off-by: Mitchell Gale <[email protected]> Removed pre tag from AstDSL.java Signed-off-by: Mitchell Gale <[email protected]> Removed pre tag from SelectExpressionAnalyzer.java Signed-off-by: Mitchell Gale <[email protected]> fixed java doc in QualifiedName.java Signed-off-by: Mitchell Gale <[email protected]> Removing checkstyle test for core and added spotless for relevant directories. Signed-off-by: Mitchell Gale <[email protected]> Fixing spacing around headers in ExpressionReferenceOptimizer.java SelectExpressionAnalyzer.java Signed-off-by: Mitchell Gale <[email protected]> Fix breaking changes. Disable some flaky tests in legacy. Signed-off-by: Yury-Fridlyand <[email protected]> (cherry picked from commit 809e656) Signed-off-by: Mitchell Gale <[email protected]> Resolving merge conflicts for pre tag in java docs. Signed-off-by: Mitchell Gale <[email protected]> running spotless check on newly pre tagged javadocs. Signed-off-by: Mitchell Gale <[email protected]> Fixed java doc spelling and improving string concatination. Signed-off-by: Mitchell Gale <[email protected]> improving string concatination. Signed-off-by: Mitchell Gale <[email protected]> Improving failure format on some functions. Signed-off-by: Mitchell Gale <[email protected]> spotless apply and fix of build.gradle Signed-off-by: Mitchell Gale <[email protected]> Resolving merge conflicts for pre tag in java docs. Signed-off-by: Mitchell Gale <[email protected]> running spotless check on newly pre tagged javadocs. Signed-off-by: Mitchell Gale <[email protected]> Converts java doc table to proper java doc table. Signed-off-by: Mitchell Gale <[email protected]> Removing unused import in OpenSearchRestClientTest.java Signed-off-by: Mitchell Gale <[email protected]> * running spotless apply. Signed-off-by: Mitchell Gale <[email protected]> * Addressed comments in PR 5. Signed-off-by: Mitchell Gale <[email protected]> --------- Signed-off-by: Mitchell Gale <[email protected]>
1 parent 88f36bd commit aa88b41

File tree

132 files changed

+1104
-1486
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+1104
-1486
lines changed

build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ repositories {
8484
spotless {
8585
java {
8686
target fileTree('.') {
87-
include '**/*.java'
87+
include 'core/src/main/java/org/opensearch/sql/analysis/**/*.java',
88+
'core/src/test/java/org/opensearch/sql/data/**/*.java',
89+
'core/src/test/java/org/opensearch/sql/datasource/**/*.java',
90+
'core/src/test/java/org/opensearch/sql/ast/**/*.java'
8891
exclude '**/build/**', '**/build-*/**'
8992
}
9093
importOrder()
@@ -95,7 +98,7 @@ spotless {
9598
removeUnusedImports()
9699
trimTrailingWhitespace()
97100
endWithNewline()
98-
// googleJavaFormat('1.17.0').reflowLongStrings().groupArtifact('com.google.googlejavaformat:google-java-format')
101+
googleJavaFormat('1.17.0').reflowLongStrings().groupArtifact('com.google.googlejavaformat:google-java-format')
99102
}
100103
}
101104

core/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ repositories {
3434
mavenCentral()
3535
}
3636

37+
checkstyleMain.ignoreFailures = true
38+
checkstyleTest.ignoreFailures = true
39+
3740
pitest {
3841
targetClasses = ['org.opensearch.sql.*']
3942
pitestVersion = '1.9.0'

core/src/main/java/org/opensearch/sql/analysis/AnalysisContext.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
76
package org.opensearch.sql.analysis;
87

98
import java.util.ArrayList;
@@ -13,26 +12,22 @@
1312
import org.opensearch.sql.expression.NamedExpression;
1413
import org.opensearch.sql.expression.function.FunctionProperties;
1514

16-
/**
17-
* The context used for Analyzer.
18-
*/
15+
/** The context used for Analyzer. */
1916
public class AnalysisContext {
20-
/**
21-
* Environment stack for symbol scope management.
22-
*/
17+
/** Environment stack for symbol scope management. */
2318
private TypeEnvironment environment;
24-
@Getter
25-
private final List<NamedExpression> namedParseExpressions;
2619

27-
@Getter
28-
private final FunctionProperties functionProperties;
20+
@Getter private final List<NamedExpression> namedParseExpressions;
21+
22+
@Getter private final FunctionProperties functionProperties;
2923

3024
public AnalysisContext() {
3125
this(new TypeEnvironment(null));
3226
}
3327

3428
/**
3529
* Class CTOR.
30+
*
3631
* @param environment Env to set to a new instance.
3732
*/
3833
public AnalysisContext(TypeEnvironment environment) {
@@ -41,9 +36,7 @@ public AnalysisContext(TypeEnvironment environment) {
4136
this.functionProperties = new FunctionProperties();
4237
}
4338

44-
/**
45-
* Push a new environment.
46-
*/
39+
/** Push a new environment. */
4740
public void push() {
4841
environment = new TypeEnvironment(environment);
4942
}

0 commit comments

Comments
 (0)