summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2019-12-01 20:45:19 -0700
committerDan Allen <dan.j.allen@gmail.com>2019-12-01 20:45:46 -0700
commitf3a10601b217a5aee8a6803f6de97a13baed0b1f (patch)
tree3ad5be39f8fdc2f80ec967f972a50de88727656f /tasks
parentddfc9957bce8de379cb4d6d1900ec7dbe52df1b8 (diff)
add linter
Diffstat (limited to 'tasks')
-rw-r--r--tasks/rubocop.rake12
1 files changed, 12 insertions, 0 deletions
diff --git a/tasks/rubocop.rake b/tasks/rubocop.rake
new file mode 100644
index 00000000..d2b06720
--- /dev/null
+++ b/tasks/rubocop.rake
@@ -0,0 +1,12 @@
+begin
+ require 'rubocop/rake_task'
+ RuboCop::RakeTask.new :lint do |t|
+ t.patterns = ['Rakefile', 'tasks/*.rake', 'lib/**/*.rb', 'spec/**/*.rb']
+ end
+rescue LoadError => e
+ task :lint do
+ raise 'Failed to load lint task.
+Install required gems using: bundle --path=.bundle/gems
+Then, invoke Rake using: bundle exec rake', cause: e
+ end
+end