Enable automatic code formatter with CI validation

This may be controversial but it we're doing it. Having code formatting needs to be consistent
and a non-issue during code review. I'm willing modify the configuration if people see a strong
need, but formatting needs to be present and enforced.
This commit is contained in:
Liam Newman
2019-11-13 13:28:23 -08:00
parent 8943af9840
commit 9d8460bb81
169 changed files with 3851 additions and 4180 deletions

View File

@@ -13,15 +13,15 @@ public class GHCreateRepositoryBuilder {
protected final Requester builder;
private final String apiUrlTail;
/*package*/ GHCreateRepositoryBuilder(GitHub root, String apiUrlTail, String name) {
/* package */ GHCreateRepositoryBuilder(GitHub root, String apiUrlTail, String name) {
this.root = root;
this.apiUrlTail = apiUrlTail;
this.builder = new Requester(root);
this.builder.with("name",name);
this.builder.with("name", name);
}
public GHCreateRepositoryBuilder description(String description) {
this.builder.with("description",description);
this.builder.with("description", description);
return this;
}
@@ -30,7 +30,7 @@ public class GHCreateRepositoryBuilder {
}
public GHCreateRepositoryBuilder homepage(String homepage) {
this.builder.with("homepage",homepage);
this.builder.with("homepage", homepage);
return this;
}
@@ -38,7 +38,7 @@ public class GHCreateRepositoryBuilder {
* Creates a private repository
*/
public GHCreateRepositoryBuilder private_(boolean b) {
this.builder.with("private",b);
this.builder.with("private", b);
return this;
}
@@ -46,7 +46,7 @@ public class GHCreateRepositoryBuilder {
* Enables issue tracker
*/
public GHCreateRepositoryBuilder issues(boolean b) {
this.builder.with("has_issues",b);
this.builder.with("has_issues", b);
return this;
}
@@ -54,7 +54,7 @@ public class GHCreateRepositoryBuilder {
* Enables wiki
*/
public GHCreateRepositoryBuilder wiki(boolean b) {
this.builder.with("has_wiki",b);
this.builder.with("has_wiki", b);
return this;
}
@@ -62,7 +62,7 @@ public class GHCreateRepositoryBuilder {
* Enables downloads
*/
public GHCreateRepositoryBuilder downloads(boolean b) {
this.builder.with("has_downloads",b);
this.builder.with("has_downloads", b);
return this;
}
@@ -70,7 +70,7 @@ public class GHCreateRepositoryBuilder {
* If true, create an initial commit with empty README.
*/
public GHCreateRepositoryBuilder autoInit(boolean b) {
this.builder.with("auto_init",b);
this.builder.with("auto_init", b);
return this;
}
@@ -78,7 +78,7 @@ public class GHCreateRepositoryBuilder {
* Allow or disallow squash-merging pull requests.
*/
public GHCreateRepositoryBuilder allowSquashMerge(boolean b) {
this.builder.with("allow_squash_merge",b);
this.builder.with("allow_squash_merge", b);
return this;
}
@@ -86,7 +86,7 @@ public class GHCreateRepositoryBuilder {
* Allow or disallow merging pull requests with a merge commit.
*/
public GHCreateRepositoryBuilder allowMergeCommit(boolean b) {
this.builder.with("allow_merge_commit",b);
this.builder.with("allow_merge_commit", b);
return this;
}
@@ -94,7 +94,7 @@ public class GHCreateRepositoryBuilder {
* Allow or disallow rebase-merging pull requests.
*/
public GHCreateRepositoryBuilder allowRebaseMerge(boolean b) {
this.builder.with("allow_rebase_merge",b);
this.builder.with("allow_rebase_merge", b);
return this;
}
@@ -104,7 +104,7 @@ public class GHCreateRepositoryBuilder {
* See https://developer.github.com/v3/repos/#create
*/
public GHCreateRepositoryBuilder gitignoreTemplate(String language) {
this.builder.with("gitignore_template",language);
this.builder.with("gitignore_template", language);
return this;
}
@@ -114,17 +114,16 @@ public class GHCreateRepositoryBuilder {
* See https://developer.github.com/v3/repos/#create
*/
public GHCreateRepositoryBuilder licenseTemplate(String license) {
this.builder.with("license_template",license);
this.builder.with("license_template", license);
return this;
}
/**
* The team that gets granted access to this repository. Only valid for creating a repository in
* an organization.
* The team that gets granted access to this repository. Only valid for creating a repository in an organization.
*/
public GHCreateRepositoryBuilder team(GHTeam team) {
if (team!=null)
this.builder.with("team_id",team.getId());
if (team != null)
this.builder.with("team_id", team.getId());
return this;
}