mirror of
https://github.com/AdrianKuta/KahootQuiz.git
synced 2025-09-16 18:14:22 +02:00
refactor: Format code with spotless
This commit applies automated code formatting using Spotless across multiple modules. The changes primarily involve adjustments to trailing commas, spacing, and import statements to ensure consistency with the project's coding style. Key changes include: - **Kotlin Files:** - Added trailing commas to multi-line parameter lists, argument lists, and collection literals in various Kotlin files across `app`, `core:designsystem`, `core:network`, `domain`, and `model:data` modules. - Standardized spacing around operators and keywords. - Optimized import statements in test files (`ExampleUnitTest.kt`, `ExampleInstrumentedTest.kt`). - **XML Files:** - Reformatted XML attributes in drawable vector files (`ic_*.xml`) within the `core:designsystem` module for better readability. - **JSON Files:** - Reformatted `sample_quiz.json` in `core:network` test resources for consistent structure. - **Detekt Configuration:** - Updated `detekt.yml` files in `app` and `core:designsystem` to adjust ignored annotations lists, ensuring proper spacing (e.g., `['Composable']` to `[ 'Composable' ]`).
This commit is contained in:
@@ -20,7 +20,7 @@ android {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
"proguard-rules.pro",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@@ -8,18 +8,18 @@ naming:
|
||||
|
||||
complexity:
|
||||
LongParameterList:
|
||||
ignoreAnnotated: ['Composable']
|
||||
ignoreAnnotated: [ 'Composable' ]
|
||||
TooManyFunctions:
|
||||
ignoreAnnotatedFunctions: ['Preview']
|
||||
ignoreAnnotatedFunctions: [ 'Preview' ]
|
||||
|
||||
style:
|
||||
MagicNumber:
|
||||
ignorePropertyDeclaration: true
|
||||
ignoreCompanionObjectPropertyDeclaration: true
|
||||
ignoreAnnotated: ['Composable']
|
||||
ignoreAnnotated: [ 'Composable' ]
|
||||
|
||||
UnusedPrivateMember:
|
||||
ignoreAnnotated: ['Composable']
|
||||
ignoreAnnotated: [ 'Composable' ]
|
||||
|
||||
# Deviations from defaults
|
||||
formatting:
|
||||
|
@@ -1,13 +1,11 @@
|
||||
package dev.adriankuta.kahootquiz
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
|
@@ -9,7 +9,7 @@ import androidx.compose.ui.Modifier
|
||||
|
||||
@Composable
|
||||
fun KahootQuizApp(
|
||||
modifier: Modifier = Modifier
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Scaffold(
|
||||
contentWindowInsets = WindowInsets.safeDrawing,
|
||||
|
@@ -16,7 +16,7 @@ fun KahootQuizNavGraph(
|
||||
NavHost(
|
||||
navController = navController,
|
||||
startDestination = QuizRoute,
|
||||
modifier = modifier
|
||||
modifier = modifier,
|
||||
) {
|
||||
quizScreen()
|
||||
}
|
||||
|
@@ -4,4 +4,4 @@ import android.app.Application
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
|
||||
@HiltAndroidApp
|
||||
class MyApplication: Application()
|
||||
class MyApplication : Application()
|
||||
|
@@ -1,9 +1,8 @@
|
||||
package dev.adriankuta.kahootquiz
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
|
Reference in New Issue
Block a user