~/talk

Custom_lint: write lints and fixes

Talkat Fluttercon Europe 2023 · 2023-07-05..07-07· [developer-experience]
links:none on file
slides:none on file

Shows how to build a real Dart lint with custom_lint and the package-side custom_lint_builder, using Riverpod-style annotations as the motivating example. Implements a rule that checks classes either missing or incorrectly extending the generated _${ClassName} pattern, adds a quick fix that inserts or replaces the extends clause, and demonstrates hot-reload, VM attach for debugging and prints. Tests use the expect_lint pattern and CI runs via dart run custom_lint; the live demo takes ~20 minutes and works end-to-end.

AI-written summary · about

  1. 0:00Introduction to custom lint
  2. 1:28Setting up a basic lint rule
  3. 8:08Detecting class declarations
  4. 13:05Adding logic to the lint
  5. 14:29Creating a quick fix
  6. 21:40Testing the lint rule
~/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.