~/talk

Writing Lint for Ruby

Talkat RubyKaigi 2017 · 2017-09-18..09-20· [ruby, testing]
links:none on file
slides:none on file

Explains how to build Ruby linters that actually find bugs by parsing code into an AST and walking it, with concrete use of parser gem vs Ripper and demo code that flags an integer literal directly in an if condition. Shows a minimal runnable linter (bug.rb) that parses files, traverses nodes with an AST traverser + visitor pattern, and emits warnings; demonstrates adding rules to RuboCop via its generator, matchers and config. Notes limits: no runtime info, redefined methods and local-variable flow cause false negatives; recommends RuboCop plugins for most cases and a standalone tool when VCS or runtime data is needed.

AI-written summary · about

  1. 0:00Introduction to linting
  2. 2:10What is a linter
  3. 5:17How linters work internally
  4. 9:35Traversing the AST
  5. 13:40Limitations of linters
  6. 18:06What linters can do
  7. 19:34Adding rules to RuboCop
  8. 27:33Building custom lint tools
  9. 32:20Q&A session
~/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.