-
Notifications
You must be signed in to change notification settings - Fork 948
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: Add support for google-java-format (#1969)
* Add support for google-java-format * adding tests and array * fix comma * Update linter.sh * get it in order * fix hava version Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
- Loading branch information
1 parent
ec410c9
commit 1afc7f8
Showing
12 changed files
with
96 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Google Java Format Test Cases | ||
|
||
This folder holds the test cases for **Google Java format**. | ||
|
||
## Additional Docs | ||
|
||
No Additional information is needed for this test case. | ||
|
||
## Good Test Cases | ||
|
||
The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. | ||
|
||
- **Note:** They are linted utilizing the default linter rules. | ||
|
||
## Bad Test Cases | ||
|
||
The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. | ||
|
||
- **Note:** They are linted utilizing the default linter rules. |
8 changes: 8 additions & 0 deletions
8
.automation/test/google_java_format/google_java_format_bad_1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class java_bad_1 // first letter of classname is not capitalized | ||
{ | ||
|
||
public static void main(String args[]) | ||
{ | ||
System.out.println("Hello, World"); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
.automation/test/google_java_format/google_java_format_bad_2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
public class Application { | ||
|
||
/** | ||
* main. | ||
* | ||
* @param args | ||
*/ | ||
public static void main(final String[] args) { | ||
SpringApplication.run(Application.class, args); | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
.automation/test/google_java_format/google_java_format_good_1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* Represents a good Java file. | ||
*/ | ||
public static class JavaGood { | ||
// Prints "Hello, World" to the terminal window. | ||
private void helloWorld() { | ||
System.out.println("Hello, World"); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
.automation/test/google_java_format/google_java_format_good_2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@SuppressWarnings("checkstyle:hideutilityclassconstructor") | ||
public class Application { | ||
|
||
/** | ||
* main. | ||
* | ||
* @param args | ||
*/ | ||
public static void main(final String[] args) { | ||
SpringApplication.run(Application.class, args); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters