[#733] Configure Detekt convention plugin
parent
049acec253
commit
f6859c5d14
@ -1,11 +0,0 @@ |
||||
disabled_rules=import-ordering,no-wildcard-imports |
||||
|
||||
# Defines the imports layout. The layout can be composed by the following symbols: |
||||
# "*" - wildcard. There must be at least one entry of a single wildcard to match all other imports. Matches anything after a specified symbol/import as well. |
||||
# "|" - blank line. Supports only single blank lines between imports. No blank line is allowed in the beginning or end of the layout. |
||||
# "^" - alias import, e.g. "^android.*" will match all android alias imports, "^" will match all other alias imports. |
||||
# import paths - these can be full paths, e.g. "java.util.List.*" as well as wildcard paths, e.g. "kotlin.**" |
||||
# Examples (we use ij_kotlin_imports_layout to set an imports layout for both ktlint and IDEA via a single property): |
||||
ij_kotlin_imports_layout=* # alphabetical with capital letters before lower case letters (e.g. Z before a), no blank lines |
||||
ij_kotlin_imports_layout=*,java.**,javax.**,kotlin.**,^ # default IntelliJ IDEA style, same as alphabetical, but with "java", "javax", "kotlin" and alias imports in the end of the imports list |
||||
ij_kotlin_imports_layout=android.**,|,^org.junit.**,kotlin.io.Closeable.*,|,*,^ # custom imports layout |
@ -0,0 +1,34 @@ |
||||
import io.gitlab.arturbosch.detekt.Detekt |
||||
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask |
||||
|
||||
plugins { |
||||
id("io.gitlab.arturbosch.detekt") |
||||
} |
||||
|
||||
tasks { |
||||
register("detektAll", Detekt::class) { |
||||
parallel = true |
||||
setSource(files(projectDir)) |
||||
include("**/*.kt") |
||||
include("**/*.kts") |
||||
exclude("**/resources/**") |
||||
exclude("**/build/**") |
||||
config.setFrom(files("${rootProject.projectDir}/tools/detekt.yml")) |
||||
baseline.set(File("${rootProject.projectDir}/tools/detekt-baseline.xml")) |
||||
buildUponDefaultConfig = true |
||||
} |
||||
|
||||
register("detektGenerateBaseline", DetektCreateBaselineTask::class) { |
||||
description = "Overrides current baseline." |
||||
buildUponDefaultConfig.set(true) |
||||
ignoreFailures.set(true) |
||||
parallel.set(true) |
||||
setSource(files(rootDir)) |
||||
config.setFrom(files("${rootProject.projectDir}/tools/detekt.yml")) |
||||
baseline.set(file("$rootDir/tools/detekt-baseline.xml")) |
||||
include("**/*.kt") |
||||
include("**/*.kts") |
||||
exclude("**/resources/**") |
||||
exclude("**/build/**") |
||||
} |
||||
} |
@ -0,0 +1,33 @@ |
||||
<?xml version="1.0" ?> |
||||
<SmellBaseline> |
||||
<ManuallySuppressedIssues></ManuallySuppressedIssues> |
||||
<CurrentIssues> |
||||
<ID>CyclomaticComplexMethod:ScreenshotTest.kt$ScreenshotTest$private fun take_screenshots_for_new_wallet_and_rest_of_app(resContext: Context, tag: String)</ID> |
||||
<ID>CyclomaticComplexMethod:ScreenshotTest.kt$private fun backupScreenshots(resContext: Context, tag: String, composeTestRule: AndroidComposeTestRule<ActivityScenarioRule<MainActivity>, MainActivity>)</ID> |
||||
<ID>FunctionNaming:ScreenshotTest.kt$ScreenshotTest$@Test @LargeTest @SdkSuppress(minSdkVersion = Build.VERSION_CODES.Q) fun take_screenshots_for_new_wallet_and_rest_of_app_dark_en_US()</ID> |
||||
<ID>FunctionNaming:ScreenshotTest.kt$ScreenshotTest$@Test @LargeTest fun take_screenshots_for_new_wallet_and_rest_of_app_light_ar_XB()</ID> |
||||
<ID>FunctionNaming:ScreenshotTest.kt$ScreenshotTest$@Test @LargeTest fun take_screenshots_for_new_wallet_and_rest_of_app_light_en_US()</ID> |
||||
<ID>FunctionNaming:ScreenshotTest.kt$ScreenshotTest$@Test @LargeTest fun take_screenshots_for_new_wallet_and_rest_of_app_light_en_XA()</ID> |
||||
<ID>FunctionNaming:ScreenshotTest.kt$ScreenshotTest$@Test @MediumTest @SdkSuppress(minSdkVersion = Build.VERSION_CODES.Q) fun take_screenshots_for_restore_wallet_dark_en_US()</ID> |
||||
<ID>FunctionNaming:ScreenshotTest.kt$ScreenshotTest$@Test @MediumTest fun take_screenshots_for_restore_wallet_light_ar_XB()</ID> |
||||
<ID>FunctionNaming:ScreenshotTest.kt$ScreenshotTest$@Test @MediumTest fun take_screenshots_for_restore_wallet_light_en_US()</ID> |
||||
<ID>FunctionNaming:ScreenshotTest.kt$ScreenshotTest$@Test @MediumTest fun take_screenshots_for_restore_wallet_light_en_XA()</ID> |
||||
<ID>FunctionNaming:ScreenshotTest.kt$ScreenshotTest$private fun take_screenshots_for_new_wallet_and_rest_of_app(resContext: Context, tag: String)</ID> |
||||
<ID>FunctionNaming:ScreenshotTest.kt$ScreenshotTest$private fun take_screenshots_for_restore_wallet(resContext: Context, tag: String)</ID> |
||||
<ID>LongMethod:ScreenshotTest.kt$ScreenshotTest$private fun take_screenshots_for_new_wallet_and_rest_of_app(resContext: Context, tag: String)</ID> |
||||
<ID>LongMethod:ScreenshotTest.kt$private fun backupScreenshots(resContext: Context, tag: String, composeTestRule: AndroidComposeTestRule<ActivityScenarioRule<MainActivity>, MainActivity>)</ID> |
||||
<ID>MagicNumber:ScreenshotTest.kt$3</ID> |
||||
<ID>MagicNumber:ScreenshotTest.kt$4</ID> |
||||
<ID>MayBeConst:EncryptedPreferenceProviderTest.kt$EncryptedPreferenceProviderTest.Companion$private val FILENAME = "encrypted_preference_test"</ID> |
||||
<ID>MayBeConst:StandardPreferenceProviderTest.kt$StandardPreferenceProviderTest.Companion$private val FILENAME = "encrypted_preference_test"</ID> |
||||
<ID>MayBeConst:SupportViewTest.kt$SupportViewTest.Companion$internal val DEFAULT_MESSAGE = "I can haz cheezburger?"</ID> |
||||
<ID>SwallowedException:AndroidUncaughtExceptionHandlerTest.kt$AndroidUncaughtExceptionHandlerTest$e: IllegalStateException</ID> |
||||
<ID>TooManyFunctions:ScreenshotTest.kt$ScreenshotTest : UiTestPrerequisites</ID> |
||||
<ID>UnusedPrivateMember:FlowExtTest.kt$FlowExtTest$i</ID> |
||||
<ID>UseRequire:CheckUpdateViewModel.kt$CheckUpdateViewModel.CheckUpdateViewModelFactory$throw IllegalArgumentException("ViewModel Not Found.")</ID> |
||||
<ID>UseRequire:ExceptionPath.kt$ExceptionPath$throw IllegalArgumentException("Directories couldn't be created")</ID> |
||||
<ID>UseRequire:ExceptionPath.kt$ExceptionPath$throw IllegalArgumentException("Path is a file when a directory was expected")</ID> |
||||
<ID>UseRequire:ExceptionPath.kt$ExceptionPath$throw IllegalArgumentException("Path is not writeable")</ID> |
||||
<ID>UseRequire:UpdateViewModel.kt$UpdateViewModel.UpdateViewModelFactory$throw IllegalArgumentException("ViewModel Not Found.")</ID> |
||||
</CurrentIssues> |
||||
</SmellBaseline> |
Loading…
Reference in new issue