~/talk

RuboCop Sent You a Friend Request

TalkinItalianat rubyday 2023 · on Friday, 2023-06-16· [ruby, developer-experience]
slides:none on file

Demonstrates building a custom RuboCop linter by using Ruby AST pattern matchers and RuboCop’s depth‑first traversal to find nodes and flag unsafe uses of unscoped where the receiver is not a Constant. Shows adding configuration to allow named helper methods to bypass the check, packaging the Cop as a gem with a company style YAML, publishing it to RubyGems, and verifies the rule catches N+1/scope mistakes.

AI-written summary · about

  1. 0:00Introduction
  2. 2:15Ruby AST overview
  3. 4:28RuboCop extends AST
  4. 8:04Pattern matching in RuboCop
  5. 11:37Traversing AST
  6. 12:00Popular RuboCop cops
  7. 16:00Create custom cop
  8. 17:03Build cop with generator
  9. 20:24Case study: rails_unscoped_over_non_model_constant
  10. 23:34Integrate cop into gem
  11. 24:17Publish gem and style guide
  12. 26:23Q&A
  13. 27:07DSL support
  14. 29:07AST challenges
  15. 30:56Adopting RuboCop cops
  16. 33:47Closing
~/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.