Custom "cops" for RuboCop: an emergency service for your Ruby code

24-Jun-2021 1834
It is hard to find a Ruby developer who never heard of RuboCop. In all the recent Evil Martians projects, RuboCop is included in the CI pipeline from the early days. However, sometimes it may be helpful to write more rules manually and to enforce some project-specific practices. By the end of the article, you’ll be in a great position to cope with custom cops, add them to your application, or even extract them into a separate gem. Let’s get started!In our experience, most well-maintained, large, and cutting-edge Ruby applications use RuboCop—a tool for checking and maintaining Ruby code style. Just include RuboCop into your CI suite, and it will save time and effort when reviewing the pull requests for basic style violations.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle