Navigation Menu

Skip to content

Commit

Permalink
Add reek analyzer and set-up default Rake task.
Browse files Browse the repository at this point in the history
  • Loading branch information
nomoon committed Feb 10, 2017
1 parent ed41499 commit 18b565a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Rakefile
@@ -1,7 +1,17 @@
# frozen_string_literal: true
require "bundler/gem_tasks"
require "reek/rake/task"
require "rubocop/rake_task"
require "rspec/core/rake_task"

Reek::Rake::Task.new do |t|
t.fail_on_error = false
end

RuboCop::RakeTask.new do |t|
t.fail_on_error = false
end

RSpec::Core::RakeTask.new(:spec)

desc "Generates default actions modules from API spec YAML file."
Expand All @@ -16,4 +26,4 @@ task :generate_default_api_modules do
end
end

task default: :spec
task default: %i[reek rubocop spec]
20 changes: 20 additions & 0 deletions config.reek
@@ -0,0 +1,20 @@
---

IrresponsibleModule:
enabled: false

NestedIterators:
max_allowed_nesting: 2

TooManyStatements:
max_statements: 10

UtilityFunction:
public_methods_only: true

# Don't complain about undocumented default actions
"lib/lunanode/api_actions/default":
DataClump:
enabled: false
LongParameterList:
enabled: false
1 change: 1 addition & 0 deletions lunanode.gemspec
Expand Up @@ -29,5 +29,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "yard", "~> 0.9"
spec.add_development_dependency "pry", "~> 0.10"
spec.add_development_dependency "reek", "~> 4.5"
spec.add_development_dependency "rubocop", "~> 0.47"
end

0 comments on commit 18b565a

Please sign in to comment.