summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2021-06-03 00:43:50 -0600
committerDan Allen <dan.j.allen@gmail.com>2021-07-31 03:13:49 -0600
commit7f768e1ab12e8ab22590ef03cf2c518cd84ef104 (patch)
treedb7ab68305db063ca3e6234951d88ee56348e29f /tasks
parent19440d76157b53e2c8b2ad4632d05db3e9fd39bd (diff)
resolves #2557 enable RuboCop to enforce a consistent code style and perform static analysis
Diffstat (limited to 'tasks')
-rw-r--r--tasks/rubocop.rake15
1 files changed, 15 insertions, 0 deletions
diff --git a/tasks/rubocop.rake b/tasks/rubocop.rake
new file mode 100644
index 00000000..4560af88
--- /dev/null
+++ b/tasks/rubocop.rake
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+begin
+ require 'rubocop/rake_task'
+ RuboCop::RakeTask.new :lint do |t|
+ #t.patterns = %w(lib/**/*.rb Rakefile Gemfile tasks/*.rake)
+ t.patterns = %w(lib/**/*.rb test/*.rb features/*.rb Rakefile Gemfile tasks/*.rake)
+ 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