Created
April 2, 2021 18:30
-
-
Save vittorius/b3b18764341aad68e63e0a9d7b8514af to your computer and use it in GitHub Desktop.
Ruumba Rake task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# The default Ruumba::RakeTask is pretty fragile, so we're going a simpler way | |
namespace :dev do | |
desc 'Run ruumba linter on app/views' | |
# rubocop:disable Rails/RakeEnvironment | |
task :ruumba, :path do |_t, args| | |
sh "bundle exec ruumba -c .ruumba.yml -e --force-exclusion '#{args.path || 'app/views'}'" do |ok| | |
puts 'Ruumba has detected some offenses' unless ok | |
end | |
end | |
# rubocop:enable Rails/RakeEnvironment | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment