Introduces rubocop-rspec

Also regenerating the config. Most stuff in there didn't really make sense.
Time to go through .rubocop_todo.yml people :-)
This commit is contained in:
Henne Vogelsang 2018-09-08 03:49:37 +02:00
parent 272690fa21
commit 5fc867a8fc
4 changed files with 583 additions and 135 deletions

View file

@ -1,41 +1,17 @@
# Inherit style from another configuration require: rubocop-rspec
inherit_from: .rubocop_todo.yml inherit_from: .rubocop_todo.yml
# Apply rule to all cops
AllCops: AllCops:
Include: UseCache: true
- '**/Rakefile' CacheRootDirectory: tmp/rubocop_cache_rails_dir
- '**/config.ru' MaxFilesInCache: 4000
Exclude:
- 'db/schema.rb'
- 'vendor/bundle/**/*'
- 'bundle/**/*'
- 'config/**/*'
- 'bin/*'
TargetRubyVersion: 2.4
#################### Metrics ############################### #################### Style ###########################
# Start with cops for Ruby >= 2.3 disabled ##################### Metrics ##################################
Style/NumericPredicate:
Enabled: false ##################### Rails ##################################
Rails: Rails:
Enabled: true Enabled: true
# Avoid deep blocks nesting
Metrics/BlockNesting:
Max: 4
# Avoid writing classes that are more than 300 lines
Metrics/ClassLength:
Max: 300
Exclude:
- 'app/models/conference.rb'
Metrics/BlockLength:
Exclude:
- 'spec/models/conference_spec.rb'
- 'spec/features/ability_spec.rb'
- 'spec/models/ability_spec.rb'
- 'spec/models/admin_ability_spec.rb'

File diff suppressed because it is too large Load diff

View file

@ -238,6 +238,7 @@ group :development do
gem 'spring-commands-rspec' gem 'spring-commands-rspec'
# for static code analisys # for static code analisys
gem 'rubocop', require: false gem 'rubocop', require: false
gem 'rubocop-rspec'
# as database # as database
gem 'sqlite3' gem 'sqlite3'
# to open mails # to open mails

View file

@ -173,10 +173,10 @@ GEM
errbase (0.1.0) errbase (0.1.0)
erubis (2.7.0) erubis (2.7.0)
execjs (2.7.0) execjs (2.7.0)
factory_bot (4.11.0) factory_bot (4.11.1)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
factory_bot_rails (4.11.0) factory_bot_rails (4.11.1)
factory_bot (~> 4.11.0) factory_bot (~> 4.11.1)
railties (>= 3.0.0) railties (>= 3.0.0)
faker (1.9.1) faker (1.9.1)
i18n (>= 0.7) i18n (>= 0.7)
@ -235,6 +235,7 @@ GEM
inversion (1.1.1) inversion (1.1.1)
loggability (~> 0.12) loggability (~> 0.12)
iso-639 (0.2.8) iso-639 (0.2.8)
jaro_winkler (1.5.1)
jquery-datatables-rails (3.4.0) jquery-datatables-rails (3.4.0)
actionpack (>= 3.1) actionpack (>= 3.1)
jquery-rails jquery-rails
@ -338,7 +339,7 @@ GEM
activerecord (>= 4.2, < 5.3) activerecord (>= 4.2, < 5.3)
request_store (~> 1.1) request_store (~> 1.1)
parallel (1.12.1) parallel (1.12.1)
parser (2.5.1.0) parser (2.5.1.2)
ast (~> 2.4.0) ast (~> 2.4.0)
pdf-core (0.2.5) pdf-core (0.2.5)
phantomjs (2.1.1.0) phantomjs (2.1.1.0)
@ -351,7 +352,7 @@ GEM
cliver (~> 0.3.1) cliver (~> 0.3.1)
multi_json (~> 1.0) multi_json (~> 1.0)
websocket-driver (>= 0.2.0) websocket-driver (>= 0.2.0)
powerpack (0.1.1) powerpack (0.1.2)
prawn (1.0.0) prawn (1.0.0)
pdf-core (~> 0.2.2) pdf-core (~> 0.2.2)
ttfunk (~> 1.1.1) ttfunk (~> 1.1.1)
@ -427,8 +428,7 @@ GEM
method_source method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (2.2.2) rainbow (3.0.0)
rake
rake (12.3.1) rake (12.3.1)
rb-fsevent (0.10.2) rb-fsevent (0.10.2)
rb-inotify (0.9.10) rb-inotify (0.9.10)
@ -480,16 +480,19 @@ GEM
rspec-mocks (~> 3.6.0) rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0) rspec-support (~> 3.6.0)
rspec-support (3.6.0) rspec-support (3.6.0)
rubocop (0.55.0) rubocop (0.58.2)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 2.5) parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1) powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1) unicode-display_width (~> 1.0, >= 1.0.1)
rubocop-rspec (1.29.1)
rubocop (>= 0.58.0)
ruby-oembed (0.12.0) ruby-oembed (0.12.0)
ruby-openid (2.5.0) ruby-openid (2.5.0)
ruby-progressbar (1.9.0) ruby-progressbar (1.10.0)
ruby_dep (1.5.0) ruby_dep (1.5.0)
rubyzip (1.2.2) rubyzip (1.2.2)
safe_yaml (1.0.4) safe_yaml (1.0.4)
@ -557,7 +560,7 @@ GEM
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.7.5) unf_ext (0.0.7.5)
unicode-display_width (1.3.2) unicode-display_width (1.4.0)
unicode_utils (1.4.0) unicode_utils (1.4.0)
unobtrusive_flash (3.3.1) unobtrusive_flash (3.3.1)
railties railties
@ -681,6 +684,7 @@ DEPENDENCIES
rspec-activemodel-mocks rspec-activemodel-mocks
rspec-rails (~> 3.5, >= 3.5.2) rspec-rails (~> 3.5, >= 3.5.2)
rubocop rubocop
rubocop-rspec
ruby-oembed (~> 0.12.0) ruby-oembed (~> 0.12.0)
sass-rails (>= 4.0.2) sass-rails (>= 4.0.2)
selectize-rails selectize-rails
@ -705,4 +709,4 @@ RUBY VERSION
ruby 2.5.0p0 ruby 2.5.0p0
BUNDLED WITH BUNDLED WITH
1.16.2 1.16.4