~/talk

Stop Debating. Start Enforcing with Lint Rules

Talkat droidcon Berlin 2024 · 2024-07-03..07-05· [developer-experience]
slides:none on file

Argues that architectural debates in PRs become automated checks by writing lint rules with Consist, which expresses rules as Consist lint rules as unit tests using a given–when–then API (JUnit or KoTest), runs on the JVM, and is executed in CI via Gradle/GitHub Actions. Shows concrete rules: require ViewModels to extend Android Jetpack ViewModel, ban repository parameters in ViewModel constructors, forbid resource imports in ViewModels, limit use cases to one public function, and catch Retrofit bugs like Retrofit @Field requires @FormUrlEncoded; demonstrates handling legacy code with a baseline for known violations and a failing run that finds two violations.

AI-written summary · about

  1. 0:00Introduction and code review struggles
  2. 4:17The real problem behind code review debates
  3. 7:08Why custom lint rules matter for architecture
  4. 8:32Consist framework and its unit test approach
  5. 11:46Writing and running your first lint rule
  6. 15:35Enforcing architecture with lint rules
  7. 20:11Preventing bugs with custom lint rules
  8. 24:07Project structure for lint rules
  9. 25:35Automating lint rules in CI/CD
  10. 27:24Benefits of enforcing architecture early
  11. 31:57Resources and community for Consist
  12. 32:17Key takeaways and closing remarks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.