require 'rubocop/rake_task' Rubocop::RakeTask.new(:rubocop) do |task| task.patterns = ['lib/**/*.rb'] end