Skip to content

Commit b5322d8

Browse files
Excavator: Upgrades Baseline to the latest version (#110)
1 parent f2201a8 commit b5322d8

3 files changed

Lines changed: 37 additions & 35 deletions

File tree

‎build.gradle‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript {
1010
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
1111
classpath 'com.netflix.nebula:nebula-publishing-plugin:14.1.1'
1212
classpath 'com.netflix.nebula:gradle-info-plugin:5.2.0'
13-
classpath 'com.palantir.baseline:gradle-baseline-java:2.42.0'
13+
classpath 'com.palantir.baseline:gradle-baseline-java:2.48.0'
1414
classpath 'gradle.plugin.org.inferred:gradle-processors:3.2.0'
1515
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2'
1616
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.14.0'
@@ -51,12 +51,9 @@ subprojects {
5151
}
5252

5353
tasks.withType(JavaCompile) {
54-
options.errorprone.errorproneArgs += [
55-
'-Xep:PreconditionsConstantMessage:OFF',
56-
'-Xep:PreferSafeLoggableExceptions:OFF',
57-
'-Xep:PreferAssertj:OFF',
58-
'-Xep:PreferSafeLoggingPreconditions:OFF',
59-
'-Xep:SwitchStatementDefaultCase:OFF'
60-
]
54+
options.errorprone.errorproneArgs += ['-Xep:PreconditionsConstantMessage:OFF',
55+
'-Xep:PreferSafeLoggableExceptions:OFF',
56+
'-Xep:PreferSafeLoggingPreconditions:OFF',
57+
'-Xep:SwitchStatementDefaultCase:OFF']
6158
}
6259
}

‎palantir-java-format/src/test/java/com/palantir/javaformat/java/FormatterTest.java‎

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,13 @@ public void stringEscapeLength() throws Exception {
330330

331331
@Test
332332
public void wrapLineComment() throws Exception {
333-
assertThat(Formatter.create().formatSource("class T {\n"
334-
+ " public static void main(String[] args) { // one long incredibly"
335-
+ " unbroken sentence moving from topic to topic so that no-one had a"
336-
+ " chance to interrupt;\n"
337-
+ " }\n"
338-
+ "}\n"))
333+
assertThat(Formatter.create()
334+
.formatSource("class T {\n"
335+
+ " public static void main(String[] args) { // one long incredibly"
336+
+ " unbroken sentence moving from topic to topic so that no-one had a"
337+
+ " chance to interrupt;\n"
338+
+ " }\n"
339+
+ "}\n"))
339340
.isEqualTo("class T {\n"
340341
+ " public static void main(\n"
341342
+ " String[]\n"
@@ -348,12 +349,13 @@ public void wrapLineComment() throws Exception {
348349

349350
@Test
350351
public void onlyWrapLineCommentOnWhitespace() throws Exception {
351-
assertThat(Formatter.create().formatSource("class T {\n"
352-
+ " public static void main(String[] args) { // one_long_incredibly"
353-
+ "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a"
354-
+ "_chance_to_interrupt;\n"
355-
+ " }\n"
356-
+ "}\n"))
352+
assertThat(Formatter.create()
353+
.formatSource("class T {\n"
354+
+ " public static void main(String[] args) { // one_long_incredibly"
355+
+ "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a"
356+
+ "_chance_to_interrupt;\n"
357+
+ " }\n"
358+
+ "}\n"))
357359
.isEqualTo("class T {\n"
358360
+ " public static void main(\n"
359361
+ " String[]\n"
@@ -366,12 +368,13 @@ public void onlyWrapLineCommentOnWhitespace() throws Exception {
366368

367369
@Test
368370
public void onlyWrapLineCommentOnWhitespace_noLeadingWhitespace() throws Exception {
369-
assertThat(Formatter.create().formatSource("class T {\n"
370-
+ " public static void main(String[] args) { //one_long_incredibly"
371-
+ "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a"
372-
+ "_chance_to_interrupt;\n"
373-
+ " }\n"
374-
+ "}\n"))
371+
assertThat(Formatter.create()
372+
.formatSource("class T {\n"
373+
+ " public static void main(String[] args) { //one_long_incredibly"
374+
+ "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a"
375+
+ "_chance_to_interrupt;\n"
376+
+ " }\n"
377+
+ "}\n"))
375378
.isEqualTo("class T {\n"
376379
+ " public static void main(\n"
377380
+ " String[]\n"
@@ -420,11 +423,12 @@ public void blankLinesImportComment() throws FormatterException {
420423

421424
@Test
422425
public void dontWrapMoeLineComments() throws Exception {
423-
assertThat(Formatter.create().formatSource("class T {\n"
424-
+ " // MOE: one long incredibly"
425-
+ " unbroken sentence moving from topic to topic so that no-one had a"
426-
+ " chance to interrupt;\n"
427-
+ "}\n"))
426+
assertThat(Formatter.create()
427+
.formatSource("class T {\n"
428+
+ " // MOE: one long incredibly"
429+
+ " unbroken sentence moving from topic to topic so that no-one had a"
430+
+ " chance to interrupt;\n"
431+
+ "}\n"))
428432
.isEqualTo("class T {\n"
429433
+ " // MOE: one long incredibly"
430434
+ " unbroken sentence moving from topic to topic so that no-one had a"

‎palantir-java-format/src/test/java/com/palantir/javaformat/java/MainTest.java‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,11 @@ public void dryRunFiles() throws Exception {
363363

364364
assertThat(exitCode).isEqualTo(0);
365365

366-
assertThat(out.toString()).isEqualTo(b.toAbsolutePath().toString()
367-
+ System.lineSeparator()
368-
+ c.toAbsolutePath().toString()
369-
+ System.lineSeparator());
366+
assertThat(out.toString())
367+
.isEqualTo(b.toAbsolutePath().toString()
368+
+ System.lineSeparator()
369+
+ c.toAbsolutePath().toString()
370+
+ System.lineSeparator());
370371
assertThat(err.toString()).isEmpty();
371372
}
372373

0 commit comments

Comments
 (0)