Basic rubocop configuration

This commit is contained in:
Colin Darie 2018-05-23 10:47:30 +02:00
parent 7266d2a21c
commit dd545992e6
No known key found for this signature in database
GPG Key ID: 4FB865FDBCA4BCC4
5 changed files with 92 additions and 2 deletions

73
.rubocop.yml Normal file
View File

@ -0,0 +1,73 @@
AllCops:
TargetRubyVersion: 2.5
Include:
- '**/Rakefile'
- '**/config.ru'
Exclude:
- 'lib/tasks/auto_annotate_models.rake'
- 'db/**/*'
- 'config/**/*'
- 'script/**/*'
- 'bin/**/*'
- !ruby/regexp /old_and_unused\.rb$/
- 'app/admin/*'
- 'tmp/*'
- Gemfile
Documentation:
Enabled: false
FrozenStringLiteralComment:
Enabled: false
ClassAndModuleChildren:
Enabled: false
Metrics/BlockLength:
Enabled: true
Exclude:
- lib/tasks/**/*
AsciiComments:
Enabled: false
AlignParameters:
Enabled: false
Layout/EndAlignment:
Enabled: true
EnforcedStyleAlignWith: variable
Metrics/LineLength:
Max: 100
Style/BlockDelimiters:
EnforcedStyle: semantic
Style/Lambda:
Enabled: false
Style/SignalException:
EnforcedStyle: semantic
Style/NumericLiteralPrefix:
Enabled: false
Style/NumericLiterals:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/SymbolArray:
Enabled: false
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma

View File

@ -45,6 +45,7 @@ group :development do
gem 'spring-watcher-listen', '~> 2.0.0' gem 'spring-watcher-listen', '~> 2.0.0'
gem 'capistrano-rails' gem 'capistrano-rails'
gem 'rubocop', '~> 0.56'
end end
group :test do group :test do

View File

@ -49,6 +49,7 @@ GEM
archive-zip (0.11.0) archive-zip (0.11.0)
io-like (~> 0.3.0) io-like (~> 0.3.0)
arel (9.0.0) arel (9.0.0)
ast (2.4.0)
bcrypt (3.1.12) bcrypt (3.1.12)
bindex (0.5.0) bindex (0.5.0)
bootsnap (1.3.0) bootsnap (1.3.0)
@ -116,6 +117,10 @@ GEM
nio4r (2.3.1) nio4r (2.3.1)
nokogiri (1.8.2) nokogiri (1.8.2)
mini_portile2 (~> 2.3.0) mini_portile2 (~> 2.3.0)
parallel (1.12.1)
parser (2.5.1.0)
ast (~> 2.4.0)
powerpack (0.1.1)
public_suffix (3.0.2) public_suffix (3.0.2)
puma (3.11.4) puma (3.11.4)
rack (2.0.5) rack (2.0.5)
@ -145,10 +150,19 @@ 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 (3.0.0)
rake (12.3.1) rake (12.3.1)
rb-fsevent (0.10.3) rb-fsevent (0.10.3)
rb-inotify (0.9.10) rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2) ffi (>= 0.5.0, < 2)
rubocop (0.56.0)
parallel (~> 1.10)
parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.9.0)
ruby_dep (1.5.0) ruby_dep (1.5.0)
rubyzip (1.2.1) rubyzip (1.2.1)
sass (3.5.6) sass (3.5.6)
@ -190,6 +204,7 @@ GEM
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (4.1.10) uglifier (4.1.10)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
unicode-display_width (1.3.2)
web-console (3.6.2) web-console (3.6.2)
actionview (>= 5.0) actionview (>= 5.0)
activemodel (>= 5.0) activemodel (>= 5.0)
@ -216,6 +231,7 @@ DEPENDENCIES
mysql2 (>= 0.4.4, < 0.6.0) mysql2 (>= 0.4.4, < 0.6.0)
puma (~> 3.11) puma (~> 3.11)
rails (~> 5.2.0) rails (~> 5.2.0)
rubocop (~> 0.56)
sass-rails (~> 5.0) sass-rails (~> 5.0)
selenium-webdriver selenium-webdriver
spring spring

View File

@ -1,6 +1,6 @@
# Add your own tasks in files placed in lib/tasks ending in .rake, # Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require_relative 'config/application' require_relative "config/application"
Rails.application.load_tasks Rails.application.load_tasks

View File

@ -1,5 +1,5 @@
# This file is used by Rack-based servers to start the application. # This file is used by Rack-based servers to start the application.
require_relative 'config/environment' require_relative "config/environment"
run Rails.application run Rails.application