~/talk

Making rules with Lint

Talkat Android Worldwide April 2021 · on Tuesday, 2021-04-27· [android, testing]
slides:none on file

Project adds a custom lint module packaged as an AAR, registers rules via an IssueRegistry, and implements a Detector that overrides getApplicableElements and visitElement to flag ImageView missing src (or enforcing app:srcCompat). Workflow uses a lint baseline to ignore ~existing warnings (about 400 built‑ins) and limits scope to resource files. Performance tips: use AGP 7.0 partial analysis, run a single target variant, avoid checkAllWarnings and test sources, and give lint more RAM — it reduces build time but still can be slow.

AI-written summary · about

  1. 0:00Introduction
  2. 2:00What is Lint
  3. 2:51Fun fact about Lint
  4. 3:31Why would I want to create my own rules
  5. 4:22Adding a link to an existing project
  6. 5:10Adding a baseline
  7. 5:27How does it work
  8. 6:07Baseline
  9. 6:22Demo
  10. 8:13Inbuilt Lint
  11. 15:19Suppress Lint
  12. 16:51Suppress a class
  13. 17:24Partial analysis
  14. 21:46Why use Lint
  15. 22:19Lint load
  16. 23:04Questions
~/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.