Permalink
Browse files

use rubocop-decko gem

  • Loading branch information...
1 parent aeb9f5d commit 2cef0bab39939896f2c70a084b43a61f49e458c0 @xithan xithan committed Nov 16, 2016
Showing with 21 additions and 2 deletions.
  1. +13 −2 .rubocop.yml
  2. +7 −0 .ruby-style.yml
  3. +1 −0 wagn/lib/wagn/generators/wagn/templates/Gemfile
View
@@ -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
View
@@ -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
@@ -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

0 comments on commit 2cef0ba

Please sign in to comment.