diff --git a/.rubocop.yml b/.rubocop.yml index 54162e12c..ea75eb48b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,7 +1,18 @@ -# require: rubocop-decko -require: rubocop-rspec +require: + - rubocop-decko + - rubocop-rspec inherit_from: .ruby-style.yml Style/IndentationConsistency: AutoCorrect: false Style/MutableConstant: AutoCorrect: false +Decko/ViewLength: + Description: Avoid views longer than 15 lines of code. + Enabled: true + CountComments: false + Max: 15 +Decko/EventLength: + Description: Avoid events longer than 10 lines of code. + Enabled: true + CountComments: false + Max: 10 \ No newline at end of file diff --git a/.ruby-style.yml b/.ruby-style.yml index e362968a8..c50dba561 100644 --- a/.ruby-style.yml +++ b/.ruby-style.yml @@ -70,6 +70,13 @@ Style/FormatString: - format - sprintf - percent +Metrics/BlockLength: + Enabled: true + Exclude: + - 'Rakefile' + - '**/*.rake' + - 'spec/**/*.rb' + - '**/*_spec.rb' RSpec/ExampleLength: Description: Checks for long examples. Enabled: true diff --git a/wagn/lib/wagn/generators/wagn/templates/Gemfile b/wagn/lib/wagn/generators/wagn/templates/Gemfile index 25c5c90f8..7482fa873 100644 --- a/wagn/lib/wagn/generators/wagn/templates/Gemfile +++ b/wagn/lib/wagn/generators/wagn/templates/Gemfile @@ -27,6 +27,7 @@ group :test do gem 'rspec', '~> 3.4' gem 'rspec-rails' # behavior-driven-development suite gem 'spork', '>=0.9' + gem 'rubocop-decko' end group :test, :development do