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

Integ/sl google java format5 #332

Merged
merged 32 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
21ce5e7
Applying Google Java code format changes to core/src/main/java/org/op…
MitchellGale Jul 25, 2023
479d1bd
Ignore on failure for checkstyle in core and added the three spotless…
MitchellGale Jul 27, 2023
a2a633a
Fixed javadoc formatting in LogicalPlanOptimizer.java LogicalValues.j…
MitchellGale Jul 31, 2023
9174d03
GJF part 4
MitchellGale Aug 2, 2023
88d772a
add build.gradle comment to mention why we are ignoring checkstyle fa…
MitchellGale Aug 2, 2023
d440000
Applied spotless changes to `core/stc/main/.../expression` and more.
MitchellGale Aug 2, 2023
7975523
Applied all spotless for PR 2 for GJF
MitchellGale Aug 2, 2023
dd95ff5
Apply spotless to fix custom fixes.
MitchellGale Aug 2, 2023
a741649
Remove unused <br>
MitchellGale Aug 2, 2023
d52b65c
spotless apply, fixing include for spotless build.gradle and adding p…
MitchellGale Aug 3, 2023
7462233
Fix include spotless build gradle.
MitchellGale Aug 3, 2023
b95580d
revert astDSL.JAVA
MitchellGale Aug 3, 2023
de6831d
revert ast changes as was covered in spotless #1 PR for GJF.
MitchellGale Aug 3, 2023
9381892
Reverting commits in ast folder attempt #2
MitchellGale Aug 3, 2023
16266e8
revert change to RaretopN.java
MitchellGale Aug 3, 2023
c9a1bce
ignoring core checkstyle failures.
MitchellGale Aug 3, 2023
496fe8e
# This is a combination of 9 commits.
MitchellGale Jul 26, 2023
7579925
parent 496fe8e5df5cfa3d15f8c6312bd89d54a51d6a83
MitchellGale Aug 3, 2023
c88dc80
running spotless apply.
MitchellGale Aug 3, 2023
ae39e70
Merge pull request #314 from Bit-Quill/dev/sl_GoogleJavaFormat3
MitchellGale Aug 3, 2023
1b7fa89
Merge pull request #317 from Bit-Quill/dev/sl_GoogleJavaFormat4
MitchellGale Aug 3, 2023
ad948b8
Merge pull request #321 from Bit-Quill/dev/sl_GoogleJavaFormat2_p2
MitchellGale Aug 3, 2023
ec7035e
Merge pull request #312 from Bit-Quill/dev/sl_GoogleJavaFormat1
MitchellGale Aug 3, 2023
d8d519d
Merge branch 'integ/sl_GoogleJavaFormat1' into integ/sl_GoogleJavaFor…
MitchellGale Aug 3, 2023
d0f3571
merge spotless pr #2
MitchellGale Aug 3, 2023
993aba2
merge spotless pr #3
MitchellGale Aug 3, 2023
a5ecf13
merge spotless pr #4
MitchellGale Aug 3, 2023
dc4035d
Spotless apply.
MitchellGale Aug 3, 2023
a7b0361
Ignore checkstyle failure on core.
MitchellGale Aug 4, 2023
50fa8e8
added pre tag to ReferenceExpressionTest.java
MitchellGale Aug 4, 2023
8638f92
Merge pull request #324 from Bit-Quill/dev/sl_GoogleJavaFormat5_p2
MitchellGale Aug 5, 2023
aa83746
addressed PR comment.
MitchellGale Aug 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,17 @@ repositories {
spotless {
java {
target fileTree('.') {
include '**/*.java'
include 'core/**/*.java'
exclude '**/build/**', '**/build-*/**'
}
// importOrder()
// licenseHeader("/*\n" +
// " * Copyright OpenSearch Contributors\n" +
// " * SPDX-License-Identifier: Apache-2.0\n" +
// " */\n\n")
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
// googleJavaFormat('1.17.0').reflowLongStrings().groupArtifact('com.google.googlejavaformat:google-java-format')
googleJavaFormat('1.17.0').reflowLongStrings().groupArtifact('com.google.googlejavaformat:google-java-format')
}
}

Expand Down
8 changes: 8 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ repositories {
mavenCentral()
}

// Being ignored as a temporary measure before being removed in favour of
// spotless https://github.com/opensearch-project/sql/issues/1101
checkstyleTest.ignoreFailures = true
checkstyleMain.ignoreFailures = true

pitest {
targetClasses = ['org.opensearch.sql.*']
pitestVersion = '1.9.0'
Expand Down Expand Up @@ -61,6 +66,9 @@ dependencies {
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4'
}

checkstyleMain.ignoreFailures = true
checkstyleTest.ignoreFailures = true

test {
useJUnitPlatform()
testLogging {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ public class DataSourceSchemaName {
private final String dataSourceName;

private final String schemaName;

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: Apache-2.0
*/


package org.opensearch.sql.analysis;

import java.util.ArrayList;
Expand All @@ -13,26 +12,22 @@
import org.opensearch.sql.expression.NamedExpression;
import org.opensearch.sql.expression.function.FunctionProperties;

/**
* The context used for Analyzer.
*/
/** The context used for Analyzer. */
public class AnalysisContext {
/**
* Environment stack for symbol scope management.
*/
/** Environment stack for symbol scope management. */
private TypeEnvironment environment;
@Getter
private final List<NamedExpression> namedParseExpressions;

@Getter
private final FunctionProperties functionProperties;
@Getter private final List<NamedExpression> namedParseExpressions;

@Getter private final FunctionProperties functionProperties;

public AnalysisContext() {
this(new TypeEnvironment(null));
}

/**
* Class CTOR.
*
* @param environment Env to set to a new instance.
*/
public AnalysisContext(TypeEnvironment environment) {
Expand All @@ -41,9 +36,7 @@ public AnalysisContext(TypeEnvironment environment) {
this.functionProperties = new FunctionProperties();
}

/**
* Push a new environment.
*/
/** Push a new environment. */
public void push() {
environment = new TypeEnvironment(environment);
}
Expand Down
Loading