Slide 1

Slide 1 text

potatotips # 8 3 iOS/Android Tips detekt

Slide 2

Slide 2 text

Android

Slide 3

Slide 3 text

detekt detekt

Slide 4

Slide 4 text

1 if for IUUQTKQNBUIXPSLTDPNEJTDPWFSZDZDMPNBUJDDPNQMFYJUZIUNM

Slide 5

Slide 5 text

IUUQTKQNBUIXPSLTDPNEJTDPWFSZDZDMPNBUJDDPNQMFYJUZIUNM

Slide 6

Slide 6 text

detekt

Slide 7

Slide 7 text

detekt Kotlin ktlint IUUQTEFUFLUEFWEPDTJOUSP

Slide 8

Slide 8 text

detekt Gradle detekt Con fi guration File

Slide 9

Slide 9 text

detekt Gradle detekt Con fi guration File

Slide 10

Slide 10 text

Detekt Gradle Plugin build.gradle plugins { id "io.gitlab.arturbosch.detekt" version “1.23.0" } Groovy DSL ⾒

Slide 11

Slide 11 text

subprojects { apply plugin: “io.gitlab.arturbosch.detekt”. detekt { config.setFrom(file("$rootDir/config/detekt/detekt.yml")) buildUponDefaultConfig = true ignoreFailures = true basePath = “$buildDir/reports/detekt" } } detekt detekt Groovy DSL ⾒ detekt con fi guration fi le con fi guration fi le build (build )

Slide 12

Slide 12 text

detekt Gradle detekt Con fi guration File

Slide 13

Slide 13 text

detekt Configuration File detekt YAML build: maxIssues: 100 excludeCorrectable: false weights: # complexity: 2 # LongParameterList: 1 # style: 1 # comments: 1 config: validation: true warningsAsErrors: false checkExhaustiveness: false excludes: ‘' processors: active: true exclude: - ‘DetektProgressListener' # - ‘KtFileCountProcessor' # - ‘PackageCountProcessor' # - ‘ClassCountProcessor' # - ‘FunctionCountProcessor' # - ‘PropertyCountProcessor’. # - ‘ProjectComplexityProcessor' # - ‘ProjectLLOCProcessor' # - ‘ProjectCLOCProcessor' 800 ɾ ɾ ɾ

Slide 14

Slide 14 text

Rule Set detekt Configuration File Rule Set 12 Rule Set Rule Con fi guration File

Slide 15

Slide 15 text

detekt Configuration File ./gradlew detektGenerateCon fi g buildUponDefaultConfig = true build.gradle config.setFrom(file(“$rootDir/config/detekt/detekt.yml")) detekt {ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹ config.setFrom(file(“$rootDir/config/detekt/detekt.yml”)) buildUponDefaultConfig = trueɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹ parallel = trueɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹ ignoreFailures = trueɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹ basePath = “$buildDir/reports/detekt"ɹɹɹɹɹɹɹɹɹɹɹɹ }ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹ build.gradle

Slide 16

Slide 16 text

detekt ./gradlew detekt

Slide 17

Slide 17 text

Reporting

Slide 18

Slide 18 text

detekt detekt

Slide 19

Slide 19 text

No content