Lightning Talk: How to Write a Custom Rubocop Rule
Jade Dickinson
• Brighton, UK
•
Lightning Talk
Date: June 30, 2023
Published: unknown
Announced: unknown
You want to enforce a standard in your codebase, like making sure a company name is in title case. So you add “always check for correct capitalisation” to your pull request guidelines. Over time, people forget to check and mistakes sneak in.
But wait - there’s an easier way! I’ll show you how you can write a custom Rubocop rule to check for you. So if someone breaks the rule, your CI tooling will flag it up so they can fix it, freeing you up to focus on more important things.
Brighton Ruby 2023