~/talk

Analyzing an analyzer - A dive into how RuboCop works

Talkat RubyConf 2022 · 2022-11-29..12-01· [ruby]
speakerdeck:doliveirakn
slides:none on file

RuboCop parses Ruby into an AST using the parser gem, walks that tree with RuboCop AST traversal so cops can implement focused on_ handlers, and performs fixes through a tree rewriter* that uses node.location.expression ranges to replace source. It runs iteratively (reprocessing after edits, risking loops), supports custom cops for migrations and deprecations, and ships a working autocorrector that solved many CI pain points. Project is ten years old and ≈270 million downloads.

AI-written summary · about

  1. 0:00Start
  2. 9:51Configuration
  3. 10:54Processing the code
  4. 17:02Applying the cop
  5. 24:24Correcting the code
~/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.