-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-18420][BUILD] Fix the errors caused by lint check in Java #15865
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,6 +52,20 @@ | |
| <property name="file" value="dev/checkstyle-suppressions.xml"/> | ||
| </module> | ||
|
|
||
| <!-- | ||
| If you wish to turn off checking for a section of code, you can put a comment in the source | ||
| before and after the section, with the following syntax: | ||
| // checkstyle:off no.XXX (such as checkstyle.off: NoFinalizer) | ||
| ... // stuff that breaks the styles | ||
| // checkstyle:on | ||
| --> | ||
| <module name="SuppressionCommentFilter"> | ||
| <property name="offCommentFormat" value="checkstyle.off\: ([\w\|]+)"/> | ||
| <property name="onCommentFormat" value="checkstyle.on\: ([\w\|]+)"/> | ||
| <property name="checkFormat" value="$1"/> | ||
| </module> | ||
|
|
||
| <!-- Checks for whitespace --> | ||
| <!-- See http://checkstyle.sf.net/config_whitespace.html --> | ||
| <module name="FileTabCharacter"> | ||
|
|
@@ -168,5 +182,6 @@ | |
| <module name="UnusedImports"/> | ||
| <module name="RedundantImport"/> | ||
| <module name="RedundantModifier"/> | ||
| <module name="FileContentsHolder"/> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this needed for, the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @srowen |
||
| </module> | ||
| </module> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,6 @@ | |
|
|
||
| import org.apache.spark.ml.feature.Interaction; | ||
| import org.apache.spark.ml.feature.VectorAssembler; | ||
| import org.apache.spark.ml.linalg.Vectors; | ||
| import org.apache.spark.sql.*; | ||
| import org.apache.spark.sql.types.DataTypes; | ||
| import org.apache.spark.sql.types.Metadata; | ||
|
|
@@ -48,7 +47,7 @@ public static void main(String[] args) { | |
| RowFactory.create(5, 9, 2, 7, 10, 7, 3), | ||
| RowFactory.create(6, 1, 1, 4, 2, 8, 4) | ||
| ); | ||
|
|
||
| StructType schema = new StructType(new StructField[]{ | ||
|
||
| new StructField("id1", DataTypes.IntegerType, false, Metadata.empty()), | ||
| new StructField("id2", DataTypes.IntegerType, false, Metadata.empty()), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I am sorry @ConeyLiu. I should have taken a look ahead first. I actually rather meant agreeing with the previous state if we should introduce such new property... Although I (as just one of contributors) think this might be worth, maybe this should be handled in a different PR.
Maybe, I think we could keep this change and then propose a new separate PR later if other people also agree with this.
Let us maybe please revert this change back and move back to the state which Sean approved for sure (but including the indentation fixes and newline fix). I will try to run the lint for sure as soon as you do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, maybe we need more advices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah OK, this is needed in order to implement a
checkstyle:offfor Java like we usescalastyle:offfor Scala? that's fine to do here if so, because it seems like we need it to get past the finalizer issue. I think that's a fine general mechanism to enable.