~/talk

Kotlin Static Analysis with Android Lint

Talkat KotlinConf 2017 · 2017-11-02..11-03· [android, testing, kotlin]
github:tnorbye
slides:none on file

Android Lint supports Kotlin and already ships about 315 checks, runs ~75% of those on the fly in the editor, and now runs outside Android via a Gradle plugin for pure Kotlin projects. It exposes a detector API, uses UAST to analyze Java and Kotlin uniformly, loads custom lint checks from AARs, and packages quickfix descriptors plus a rich unit-test DSL. It enforces a ~40-check “target lint vital” on release builds, offers a baseline workflow to ignore existing warnings, and is adding an expensive but usable call-graph for interprocedural analysis.

AI-written summary · about

  1. 0:00Intro
  2. 0:23Outline
  3. 1:58Annotation Checks
  4. 3:44Lint Features Designed for tool integration
  5. 5:18Check Release Builds
  6. 8:44Write your checks in Kotlin
  7. 9:33Custom Check Project
  8. 10:03Client API vs Detector API
  9. 10:20Client API: LintClient
  10. 11:48Creating a lint check
  11. 13:12Text Format
  12. 14:55Detector Interfaces
  13. 18:54Linked Locations
  14. 19:36Detector Lifecycle
  15. 19:52Predefined Iteration Order
  16. 20:19Multipass Analysis
  17. 22:07Scopes: On the fly analysis
  18. 25:05UAST versus PSI PSE Program Structure Interface
  19. 25:38PSI exterior, UAST interior
  20. 26:33UastScanner
  21. 27:59Single Tree Iteration
  22. 28:36Important Helpers
  23. 29:00Constant Evaluator
  24. 29:49Type Evaluator
  25. 30:28Annotation Support
  26. 31:23Kotlin Argument Mapping
  27. 33:23Quickfixes - String Replacements
  28. 34:54Merged Manifest Support
  29. 35:25Call Graph Support
  30. 36:16Test DSL
  31. 36:26Gotcha's Things to look out for with Kotlin
~/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.