Course map
Stage 1: Foundation
Stage 2: Intermediate
Stage 3: Advanced
Stage 4: DSA in Kotlin
Stage 5: Specialization

Part 11 / Topic 9 of 9

Linters and debuggers — know they exist, not claimed as verified here

Neither ktlint nor detekt is installed on this machine (which ktlint / which detekt both came back empty), so nothing about them is demonstrated as running code here — only what they're for:

  • ktlint — a formatter/linter that enforces the official Kotlin style guide (spacing, trailing commas, import order). Typically run as a Gradle task (ktlintCheck/ktlintFormat) or a pre-commit hook.
  • detekt — a static-analysis linter that looks for code smells rather than formatting — overly complex functions, magic numbers, unused code — configurable per project.

A debugger is an IDE feature, not a command-line one: setting a breakpoint on a line pauses execution there, letting you inspect every variable's current value before stepping to the next line. There's no terminal transcript for this — it's something to try in IntelliJ IDEA or Android Studio directly, on the test in section 8 that resolves incorrectly, to watch exactly where membershipDiscountPercent fails to resolve.

Done here? The practice set for Part 11 — including the solutions — is on the part page.

Search the guide