Skip to content

Commit 1a14ea8

Browse files
committed
Add lint to default rake tasks
Currently when we run bundle exec rake only rspec runs. Adding a lint rake task, and including this with the default rake tasks to match search-api and search-api-v2-beta-features
1 parent aff121a commit 1a14ea8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Rakefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ require_relative "config/application"
55

66
Rails.application.load_tasks
77

8-
task default: %i[spec]
8+
# Undo any existing default tasks added by dependencies so we can redefine the task
9+
Rake::Task[:default].clear if Rake::Task.task_defined?(:default)
10+
task default: %i[lint spec]

lib/tasks/lint.rake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
desc "Run all linters"
2+
task lint: :environment do
3+
sh "bundle exec rubocop"
4+
end

0 commit comments

Comments
 (0)