chore: reformat with trailing commas changes

This commit is contained in:
Harsh Shandilya 2024-05-28 15:11:50 +05:30
parent de6cdfee0e
commit c980c898de
100 changed files with 309 additions and 563 deletions

View file

@ -41,10 +41,7 @@ class KotlinCommonPlugin : Plugin<Project> {
companion object {
private val ADDITIONAL_COMPILER_ARGS =
listOf(
"-opt-in=kotlin.RequiresOptIn",
"-Xsuppress-version-warnings",
)
listOf("-opt-in=kotlin.RequiresOptIn", "-Xsuppress-version-warnings")
val JVM_TOOLCHAIN_ACTION =
Action<JavaToolchainSpec> { languageVersion.set(JavaLanguageVersion.of(17)) }

View file

@ -62,10 +62,7 @@ class CrowdinDownloadPlugin : Plugin<Project> {
if (extension.skipCleanup.getOrElse(false)) {
emptySet()
} else {
setOf(
extractStrings.map { it.source },
downloadCrowdin.map { it.outputFiles },
)
setOf(extractStrings.map { it.source }, downloadCrowdin.map { it.outputFiles })
}
}
}

View file

@ -57,7 +57,7 @@ abstract class KtfmtCheckTask : SourceTask() {
maxWidth = 100,
continuationIndent = 2,
),
originCode
originCode,
)
val pathNormalizer = { file: File -> file.toRelativeString(projectDirectory.asFile.get()) }
return (originCode != formattedCode) to

View file

@ -10,7 +10,7 @@ object KtfmtDiffer {
fun computeDiff(
inputFile: File,
formattedCode: String,
pathNormalizer: (File) -> String
pathNormalizer: (File) -> String,
): List<KtfmtDiffEntry> {
val originCode = inputFile.readText()
return DiffUtils.diff(originCode, formattedCode, null).deltas.map {

View file

@ -11,10 +11,8 @@ import org.jetbrains.kotlin.utils.addToStdlib.ifNotEmpty
abstract class KtfmtFormatTask
@Inject
constructor(
private val workerExecutor: WorkerExecutor,
private val projectLayout: ProjectLayout,
) : SourceTask() {
constructor(private val workerExecutor: WorkerExecutor, private val projectLayout: ProjectLayout) :
SourceTask() {
@TaskAction
fun execute() {

View file

@ -104,7 +104,7 @@ abstract class PSLUpdateTask : DefaultTask() {
var totalRuleBytes: Int = 0,
var totalExceptionRuleBytes: Int = 0,
val sortedRules: TreeSet<ByteString> = TreeSet(),
val sortedExceptionRules: TreeSet<ByteString> = TreeSet()
val sortedExceptionRules: TreeSet<ByteString> = TreeSet(),
)
private companion object {

View file

@ -48,7 +48,7 @@ abstract class GitHooks : DefaultTask() {
GROUP_EXECUTE,
OTHERS_READ,
OTHERS_EXECUTE,
)
),
)
}
}