~/talk

All comments must be haiku! Custom linting with RuboCop

Talkat RubyConf 2021 · 2021-11-08..11-10· [ruby]
github:karibeari
slides:none on file

Workshop builds a custom RuboCop cop that enforces "all comments must be haiku" by checking comment blocks for three lines and a 5‑7‑5 syllable count. It uses the parser AST with comments, a syllable‑counting library to score lines, add_offense to flag violations, and a staged repo (step directories plus switch_step) for live debugging with pry. The node pattern matcher DSL narrows checks to methods named poetically; syllable library is imperfect and autocorrect for haiku is nontrivial.

AI-written summary · about

  1. 0:00Start
  2. 1:00Scott Moore
  3. 1:22Carrie Silva
  4. 7:15Rubyparse
  5. 14:39Processed Source
  6. 48:42Node Pattern Dsl
  7. 49:48Node Pattern Debugger
  8. 51:12Node Patterns
~/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.