Skip to content

Commit

Permalink
MAT-6576: Use Spotify formatter. Run and commit results.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotanchik-SB committed May 21, 2024
1 parent 9145bc9 commit 4ccd16a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 48 deletions.
54 changes: 19 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,27 +166,19 @@
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.21.1</version>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.theoryinpractise</groupId>
<artifactId>googleformatter-maven-plugin</artifactId>
<versionRange>[1.7.3,)</versionRange>
<goals>
<goal>format</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
<skipSortingImports>true</skipSortingImports>
<style>google</style>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -230,28 +222,20 @@
</configuration>
</plugin>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>googleformatter-maven-plugin</artifactId>
<version>1.7.3</version>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.23</version>
<executions>
<execution>
<id>reformat-sources</id>
<phase>process-sources</phase>
<goals>
<goal>format</goal>
</goals>
<configuration>
<includeStale>false</includeStale>
<style>GOOGLE</style>
<formatMain>true</formatMain>
<formatTest>true</formatTest>
<filterModified>false</filterModified>
<skip>false</skip>
<fixImports>false</fixImports>
<maxLineLength>100</maxLineLength>
</configuration>
</execution>
</executions>
<configuration>
<skipSortingImports>true</skipSortingImports>
<style>google</style>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,7 @@ public void testUpdateCqlLibraryReturns200ForSuccessfulUpdate() throws Exception
LibrarySet.builder().librarySetId(TEST_LIBRARYSET_ID).owner(TEST_USER_ID).build())
.build();
final CqlLibrary updatingLibrary =
existingLibrary
.toBuilder()
existingLibrary.toBuilder()
.id("Library1_ID")
.cqlLibraryName("NewName")
.cql("library testCql version '2.1.000'")
Expand Down Expand Up @@ -933,8 +932,7 @@ public void testCreateDraftReturnsConflictWhenDraftAlreadyExists() throws Except
.build();
final String json =
toJsonString(
existingLibrary
.toBuilder()
existingLibrary.toBuilder()
.draft(false)
.version(new Version(2, 1, 0))
.cql("library Library1 version '1.0.000'")
Expand Down Expand Up @@ -976,8 +974,7 @@ public void testCreateDraftReturnsNotFound() throws Exception {
.build();
final String json =
toJsonString(
existingLibrary
.toBuilder()
existingLibrary.toBuilder()
.draft(false)
.version(new Version(2, 1, 0))
.cql("library Library1 version '1.0.000'")
Expand Down Expand Up @@ -1019,8 +1016,7 @@ public void testCreateDraftReturnsBadRequestForNameChangeNonUnique() throws Exce
.build();
final String json =
toJsonString(
existingLibrary
.toBuilder()
existingLibrary.toBuilder()
.cqlLibraryName("ChangedName")
.cql("library ChangedName version '1.0.000'")
.draft(false)
Expand Down Expand Up @@ -1064,8 +1060,7 @@ public void testCreateDraftReturnsCreatedDraft() throws Exception {
.build();
final String json =
toJsonString(
draftLibrary
.toBuilder()
draftLibrary.toBuilder()
.draft(false)
.cql("library Library1 version '1.2.000'")
.build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,7 @@ public void testUpdateCqlLibrarySuccessfullyUpdates() {
.lastModifiedBy("User1")
.build();
final CqlLibrary updatingLibrary =
existingLibrary
.toBuilder()
existingLibrary.toBuilder()
.id("Library1_ID")
.cqlLibraryName("NewName")
.cql("library testCql version '2.1.000'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.when;

Expand Down

0 comments on commit 4ccd16a

Please sign in to comment.