Open7

KMM detekt導入メモ

75py75py
detekt
detektAndroidDebug - EXPERIMENTAL: Run detekt analysis for debug classes with type resolution
detektAndroidDebugAndroidTest - EXPERIMENTAL: Run detekt analysis for debugAndroidTest classes with type resolution
detektAndroidDebugUnitTest - EXPERIMENTAL: Run detekt analysis for debugUnitTest classes with type resolution
detektAndroidRelease - EXPERIMENTAL: Run detekt analysis for release classes with type resolution
detektAndroidReleaseUnitTest - EXPERIMENTAL: Run detekt analysis for releaseUnitTest classes with type resolution
detektBaseline - Creates a detekt baseline on the given --baseline path.
detektBaselineAndroidDebug - EXPERIMENTAL: Creates detekt baseline for debug classes with type resolution
detektBaselineAndroidDebugAndroidTest - EXPERIMENTAL: Creates detekt baseline for debugAndroidTest classes with type resolution
detektBaselineAndroidDebugUnitTest - EXPERIMENTAL: Creates detekt baseline for debugUnitTest classes with type resolution
detektBaselineAndroidRelease - EXPERIMENTAL: Creates detekt baseline for release classes with type resolution
detektBaselineAndroidReleaseUnitTest - EXPERIMENTAL: Creates detekt baseline for releaseUnitTest classes with type resolution
detektBaselineIosArm64Main - Creates detekt baseline for iosArm64 and source set main
detektBaselineIosArm64Test - Creates detekt baseline for iosArm64 and source set test
detektBaselineIosX64Main - Creates detekt baseline for iosX64 and source set main
detektBaselineIosX64Test - Creates detekt baseline for iosX64 and source set test
detektBaselineMetadataCommonMain - Creates detekt baseline for metadata and source set commonMain
detektBaselineMetadataIosMain - Creates detekt baseline for metadata and source set iosMain
detektBaselineMetadataMain - Creates detekt baseline for metadata and source set main
detektGenerateConfig - Generate a detekt configuration file inside your project.
detektIosArm64Main - Run detekt analysis for target iosArm64 and source set main
detektIosArm64Test - Run detekt analysis for target iosArm64 and source set test
detektIosX64Main - Run detekt analysis for target iosX64 and source set main
detektIosX64Test - Run detekt analysis for target iosX64 and source set test
detektMetadataCommonMain - Run detekt analysis for target metadata and source set commonMain
detektMetadataIosMain - Run detekt analysis for target metadata and source set iosMain
detektMetadataMain - Run detekt analysis for target metadata and source set main
75py75py

detektMetadataMain で実行

./gradlew detektMetadataMain
75py75py

detektGenerateConfig で config/detekt/detekt.yml が出力される

./gradlew detektGenerateConfig
75py75py

detektBaselineMetadataMain で今出ているものを抑制するファイル shared/detekt-baseline.xml が出力される

./gradlew detektBaselineMetadataMain