Skip to content

Commit 2467e52

Browse files
committed
Try palantir format
1 parent 36d8f03 commit 2467e52

File tree

91 files changed

+2925
-3098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+2925
-3098
lines changed

build.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,10 @@ spotless {
139139
removeUnusedImports()
140140

141141
// Choose one formatters: google or palantir
142-
googleJavaFormat("1.32.0").reflowLongStrings().formatJavadoc(true)
143-
144-
leadingTabsToSpaces(1)
142+
palantirJavaFormat().formatJavadoc(true)
145143
formatAnnotations()
146144
trimTrailingWhitespace()
145+
leadingTabsToSpaces(2)
147146
endWithNewline()
148147

149148
target("src/**/*.java")

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ org.gradle.jvmargs=-Xmx2g -XX:+UseG1GC -Dfile.encoding=UTF-8 --enable-native-acc
1010
# Kotlin incremental compilation
1111
kotlin.incremental=true
1212
kotlin.compiler.execution.strategy=daemon
13+
palantir.native.formatter=true

src/main/java/org/nkcoder/UserApplication.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@ConfigurationPropertiesScan
99
public class UserApplication {
1010

11-
public static void main(String[] args) {
12-
SpringApplication.run(UserApplication.class, args);
13-
}
11+
public static void main(String[] args) {
12+
SpringApplication.run(UserApplication.class, args);
13+
}
1414
}

src/main/java/org/nkcoder/auth/application/dto/command/RegisterCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/** Command for user registration. */
66
public record RegisterCommand(String email, String password, String name, AuthRole role) {
77

8-
public RegisterCommand(String email, String password, String name) {
9-
this(email, password, name, AuthRole.MEMBER);
10-
}
8+
public RegisterCommand(String email, String password, String name) {
9+
this(email, password, name, AuthRole.MEMBER);
10+
}
1111
}

src/main/java/org/nkcoder/auth/application/dto/response/AuthResult.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
import org.nkcoder.auth.domain.model.TokenPair;
66

77
/** Result of authentication operations (register, login, refresh). */
8-
public record AuthResult(
9-
UUID userId, String email, AuthRole role, String accessToken, String refreshToken) {
8+
public record AuthResult(UUID userId, String email, AuthRole role, String accessToken, String refreshToken) {
109

11-
public static AuthResult of(UUID userId, String email, AuthRole role, TokenPair tokens) {
12-
return new AuthResult(userId, email, role, tokens.accessToken(), tokens.refreshToken());
13-
}
10+
public static AuthResult of(UUID userId, String email, AuthRole role, TokenPair tokens) {
11+
return new AuthResult(userId, email, role, tokens.accessToken(), tokens.refreshToken());
12+
}
1413
}

0 commit comments

Comments
 (0)