Add more Spotless rules (#3005)

This commit is contained in:
Mikael Mengistu 2018-09-26 17:45:19 -07:00 committed by GitHub
parent 13f2ebe2f6
commit 79663b480d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -32,10 +32,16 @@ spotless {
importOrder 'java', 'javax', 'org', 'com', 'com.diffplug', '' // A sequence of package names
replace 'Not enough space after if', 'if(', 'if ('
replace 'Not enough space after else', 'else{', 'else {'
replace 'Not enough space before else', '}else', '} else '
replace 'Not enough space after try', 'try{', 'try {'
replace 'Not enough space before finally', '}finally', '} finally'
replace 'Not enough space after finally', 'finally{', 'finally {'
replace 'Not enough space after )', '){', ') {'
replace 'Not enough space after for', 'for(', 'for ('
replace 'Not enough space after while', 'while (', 'while ('
replace 'Not enough space after switch', 'switch(', 'switch ('
replace 'Not enough space after do', 'do{', 'do {'
replaceRegex 'Too much space after if', 'if +\\(', 'if ('
trimTrailingWhitespace()
indentWithSpaces(4)