From 80ec0b6df02e430ccc7b11275b42c74048197ad7 Mon Sep 17 00:00:00 2001 From: Dan Rice Date: Sun, 31 Jan 2016 11:33:59 -0500 Subject: [PATCH] Add RuboCop * Exclude bin/ because it's generated code * Max line length of 120 characters * Documentation not required * Prefer double-quoted strings --- .rubocop.yml | 15 +++++++++++++++ Gemfile | 1 + Gemfile.lock | 14 ++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 .rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..3c3b1278 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,15 @@ +Rails: + Enabled: true + +AllCops: + Exclude: + - bin/* + +Metrics/LineLength: + Max: 120 + +Style/Documentation: + Enabled: false + +Style/StringLiterals: + EnforcedStyle: double_quotes diff --git a/Gemfile b/Gemfile index f1ef5ff5..e86a9c4f 100644 --- a/Gemfile +++ b/Gemfile @@ -61,6 +61,7 @@ end group :development, :test do gem 'pry' + gem "rubocop", require: false end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 748d6103..7036d277 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,6 +57,7 @@ GEM childprocess (>= 0.3.6) cucumber (>= 1.1.1) rspec-expectations (>= 2.7.0) + ast (2.3.0) autoprefixer-rails (5.1.0) execjs json @@ -158,6 +159,9 @@ GEM cocaine (~> 0.5.5) mime-types mimemagic (= 0.3.0) + parser (2.3.1.2) + ast (~> 2.2) + powerpack (0.1.1) pry (0.10.1) coderay (~> 1.1.0) method_source (~> 0.8.1) @@ -191,12 +195,20 @@ GEM activesupport (= 4.2.6) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) + rainbow (2.1.0) rake (11.1.2) ref (1.0.5) rspec-expectations (3.1.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.1.0) rspec-support (3.1.2) + rubocop (0.42.0) + parser (>= 2.3.1.1, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) + ruby-progressbar (1.8.1) rubyzip (1.1.7) safe_yaml (1.0.4) sanitize (3.0.3) @@ -253,6 +265,7 @@ GEM uglifier (2.7.2) execjs (>= 0.3.0) json (>= 1.8.0) + unicode-display_width (1.1.0) uniform_notifier (1.6.2) websocket (1.2.2) will_paginate (3.0.7) @@ -293,6 +306,7 @@ DEPENDENCIES rails-dom-testing! rails_autolink rspec-expectations + rubocop sanitize (>= 3.0.0) sass-rails (~> 5.0) selenium-webdriver (>= 2.50)