[skip ci] Run spotless (#13197)

* spotlessApply

* fix lint errors

* build errors

* editonconfig changes

* unused imports

(cherry picked from commit cd2ac54524ddeb4fdea43e7901b1151b20f634af)
(cherry picked from commit 14980cb6ae15db48d6d539e64fd621e1768fc37d)
This commit is contained in:
AwkwardPeak7
2026-02-19 17:17:18 +05:00
committed by Cuong-Tran
parent c70c2afd5d
commit 8a37ad935d
10 changed files with 20 additions and 13 deletions

View File

@@ -8,6 +8,7 @@ end_of_line = lf
[*.kt]
charset = utf-8
indent_size = 4
max_line_length = 140
indent_style = space
trim_trailing_whitespace = true
ij_kotlin_allow_trailing_comma = true
@@ -15,5 +16,11 @@ ij_kotlin_allow_trailing_comma_on_call_site = true
ij_kotlin_name_count_to_use_star_import = 2147483647
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
ktlint_standard_discouraged-comment-location = disabled
ktlint_function_signature_body_expression_wrapping = default
ktlint_standard_chain-method-continuation = disable
ktlint_standard_blank-line-between-when-conditions = disabled
ktlint_standard_no-unused-imports = enabled
[*.properties]
charset = utf-8

View File

@@ -81,7 +81,6 @@ jobs:
- name: Checkout PR
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Java

View File

@@ -98,7 +98,6 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
persist-credentials: false
- name: Set up Java

View File

@@ -3,16 +3,12 @@ plugins {
}
spotless {
ratchetFrom = ""
kotlin {
target("**/*.kt", "**/*.kts")
targetExclude("**/build/**/*.kt")
ktlint()
.editorConfigOverride(mapOf(
"ktlint_standard_discouraged-comment-location" to "disabled",
"ktlint_function_signature_body_expression_wrapping" to "default",
"ktlint_standard_chain-method-continuation" to "disable"
"max_line_length" to 2147483647,
))
trimTrailingWhitespace()
endWithNewline()

View File

@@ -56,7 +56,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
if (!ddg2Cookie?.value.isNullOrEmpty()) {
return ddg2Cookie
}
val wellKnown = client.newCall(GET("https://check.ddos-guard.net/check.js"))
val wellKnown = client.newCall(GET(WELL_KNOWN_URL))
.execute().body.string()
.substringAfter("'", "")
.substringBefore("'", "")
@@ -67,6 +67,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
}
companion object {
private const val WELL_KNOWN_URL = "https://check.ddos-guard.net/check.js"
private val ERROR_CODES = listOf(403)
private val SERVER_CHECK = listOf("ddos-guard")
}

View File

@@ -57,7 +57,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
if (!ddg2Cookie?.value.isNullOrEmpty()) {
return ddg2Cookie
}
val wellKnown = client.newCall(GET("https://check.ddos-guard.net/check.js"))
val wellKnown = client.newCall(GET(WELL_KNOWN_URL))
.execute().body.string()
.substringAfter("'", "")
.substringBefore("'", "")
@@ -68,6 +68,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
}
companion object {
private const val WELL_KNOWN_URL = "https://check.ddos-guard.net/check.js"
private val ERROR_CODES = listOf(403)
private val SERVER_CHECK = listOf("ddos-guard")
}

View File

@@ -55,7 +55,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
if (!ddg2Cookie?.value.isNullOrEmpty()) {
return ddg2Cookie
}
val wellKnown = client.newCall(GET("https://check.ddos-guard.net/check.js"))
val wellKnown = client.newCall(GET(WELL_KNOWN_URL))
.execute().body.string()
.substringAfter("'", "")
.substringBefore("'", "")
@@ -66,6 +66,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
}
companion object {
private const val WELL_KNOWN_URL = "https://check.ddos-guard.net/check.js"
private val ERROR_CODES = listOf(403)
private val SERVER_CHECK = listOf("ddos-guard")
}

View File

@@ -55,7 +55,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
if (!ddg2Cookie?.value.isNullOrEmpty()) {
return ddg2Cookie
}
val wellKnown = client.newCall(GET("https://check.ddos-guard.net/check.js"))
val wellKnown = client.newCall(GET(WELL_KNOWN_URL))
.execute().body.string()
.substringAfter("'", "")
.substringBefore("'", "")
@@ -66,6 +66,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
}
companion object {
private const val WELL_KNOWN_URL = "https://check.ddos-guard.net/check.js"
private val ERROR_CODES = listOf(403)
private val SERVER_CHECK = listOf("ddos-guard")
}

View File

@@ -52,7 +52,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
if (!ddg2Cookie?.value.isNullOrEmpty()) {
return ddg2Cookie
}
val wellKnown = client.newCall(GET("https://check.ddos-guard.net/check.js"))
val wellKnown = client.newCall(GET(WELL_KNOWN_URL))
.execute().body.string()
.substringAfter("'", "")
.substringBefore("'", "")
@@ -63,6 +63,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
}
companion object {
private const val WELL_KNOWN_URL = "https://check.ddos-guard.net/check.js"
private val ERROR_CODES = listOf(403)
private val SERVER_CHECK = listOf("ddos-guard")
}

View File

@@ -52,7 +52,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
if (!ddg2Cookie?.value.isNullOrEmpty()) {
return ddg2Cookie
}
val wellKnown = client.newCall(GET("https://check.ddos-guard.net/check.js"))
val wellKnown = client.newCall(GET(WELL_KNOWN_URL))
.execute().body.string()
.substringAfter("'", "")
.substringBefore("'", "")
@@ -63,6 +63,7 @@ class DdosGuardInterceptor(private val client: OkHttpClient) : Interceptor {
}
companion object {
private const val WELL_KNOWN_URL = "https://check.ddos-guard.net/check.js"
private val ERROR_CODES = listOf(403)
private val SERVER_CHECK = listOf("ddos-guard")
}