1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00

Simplify Rubocop configuration

The original Rubocop configuration was copied from other thoughtbot
projects. Of course, Rubocop comes with its own set of default settings.
Therefore, we don't need to re-specify settings that it already has --
we only need to specify the ones that we're overriding.

Besides this, Rubocop isn't even in the Gemfile, so even though Hound
runs on GitHub automatically, it'd be nice to spot style issues as you
are editing files.

Given this, this commit simplifies the Rubocop configuration and also
adds Rubocop to the Gemfile so that you can configure your editor to
lint files as you are editing them.
This commit is contained in:
Elliot Winkler 2018-09-12 21:33:48 -06:00 committed by Gui Vieira
parent 517d0ec9dd
commit e2154f9e4e
12 changed files with 277 additions and 1082 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,15 +1,181 @@
inherit_from: .hound/ruby.yml
AllCops:
TargetRubyVersion: 2.4
Layout/AlignParameters:
EnforcedStyle: with_fixed_indentation
Layout/ConditionPosition:
Enabled: false
Layout/DotPosition:
EnforcedStyle: trailing
Lint/AmbiguousOperator:
Enabled: false
Lint/AmbiguousRegexpLiteral:
Enabled: false
Lint/AssignmentInCondition:
Enabled: false
Lint/DeprecatedClassMethods:
Enabled: false
Lint/ElseLayout:
Enabled: false
Lint/HandleExceptions:
Enabled: false
Lint/IndentHeredoc:
Enabled: false
Lint/LiteralInInterpolation:
Enabled: false
Lint/Loop:
Enabled: false
Lint/ParenthesesAsGroupedExpression:
Enabled: false
Lint/RequireParentheses:
Enabled: false
Lint/UnderscorePrefixedVariableName:
Enabled: false
Lint/Void:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/LineLength:
IgnoredPatterns:
- "^[ ]*describe.+$"
- "^[ ]*context.+$"
- "^[ ]*shared_context.+$"
- "^[ ]*shared_examples_for.+$"
- "^[ ]*it.+$"
Naming/AccessorMethodName:
Enabled: false
Naming/AsciiIdentifiers:
Enabled: false
Naming/BinaryOperatorParameterName:
Enabled: false
Style/ClassVars:
Enabled: false
Style/ColonMethodCall:
Enabled: false
Naming/FileName:
Enabled: false
Rails:
Enabled: true
Rails/Delegate:
Enabled: false
Rails/HttpPositionalArguments:
Enabled: false
Style/Alias:
Enabled: false
Style/ArrayJoin:
Enabled: false
Style/AsciiComments:
Enabled: false
Style/Attr:
Enabled: false
Style/CaseEquality:
Enabled: false
Style/CharacterLiteral:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/CollectionMethods:
PreferredMethods:
find: detect
reduce: inject
collect: map
find_all: select
Style/CommentAnnotation:
Enabled: false
Style/Documentation:
Enabled: false
Style/DoubleNegation:
Enabled: false
Style/EachWithObject:
Enabled: false
Style/EmptyLiteral:
Enabled: false
Style/Encoding:
Enabled: false
Style/EvenOdd:
Enabled: false
Style/FlipFlop:
Enabled: false
Style/FormatString:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/GlobalVars:
Enabled: false
Style/GuardClause:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/IfWithSemicolon:
Enabled: false
Style/InlineComment:
Enabled: false
Style/Lambda:
Enabled: false
Style/LambdaCall:
Enabled: false
Style/LineEndConcatenation:
Enabled: false
Style/MethodCalledOnDoEndBlock:
Enabled: false
Style/ModuleFunction:
Enabled: false
Style/NegatedIf:
Enabled: false
Style/NegatedWhile:
Enabled: false
Style/Next:
Enabled: false
Style/NilComparison:
Enabled: false
Style/Not:
Enabled: false
Style/NumericLiterals:
Enabled: false
Style/NumericPredicate:
Enabled: false
Style/OneLineConditional:
Enabled: false
Style/PercentLiteralDelimiters:
Enabled: false
Style/PerlBackrefs:
Enabled: false
Style/PreferredHashMethods:
Enabled: false
Style/Proc:
Enabled: false
Style/RaiseArgs:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Style/SelfAssignment:
Enabled: false
Style/SignalException:
Enabled: false
Style/SingleLineBlockParams:
Enabled: false
Style/SingleLineMethods:
Enabled: false
Style/SpecialGlobalVars:
Enabled: false
Style/StringLiterals:
EnforcedStyle: single_quotes
Style/SymbolArray:
Enabled: false
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrivialAccessors:
Enabled: false
Style/WhenThen:
Enabled: false
Style/WhileUntilModifier:
Enabled: false
Style/WordArray:
Enabled: false
Style/VariableInterpolation:
Enabled: false

View file

@ -6,10 +6,11 @@ gem 'pry'
gem 'pry-byebug'
gem 'rake', '12.3.0'
gem 'rspec', '~> 3.6'
gem 'rubocop', require: false
gem 'zeus', require: false
# YARD
gem 'yard'
gem 'redcarpet'
gem 'pygments.rb'
gem 'fssm'
gem 'pygments.rb'
gem 'redcarpet'
gem 'yard'

View file

@ -5,12 +5,18 @@ GEM
bundler
rake
thor (>= 0.14.0)
ast (2.4.0)
byebug (9.1.0)
coderay (1.1.2)
diff-lcs (1.3)
fssm (0.2.10)
jaro_winkler (1.5.1)
method_source (0.9.0)
multi_json (1.12.1)
parallel (1.12.1)
parser (2.5.1.2)
ast (~> 2.4.0)
powerpack (0.1.2)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
@ -19,6 +25,7 @@ GEM
pry (~> 0.10)
pygments.rb (1.1.1)
multi_json (>= 1.0.0)
rainbow (3.0.0)
rake (12.3.0)
redcarpet (3.4.0)
rspec (3.6.0)
@ -34,7 +41,17 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
rubocop (0.59.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.10.0)
thor (0.20.0)
unicode-display_width (1.4.0)
yard (0.9.12)
zeus (0.15.14)
method_source (>= 0.6.7)
@ -52,8 +69,9 @@ DEPENDENCIES
rake (= 12.3.0)
redcarpet
rspec (~> 3.6)
rubocop
yard
zeus
BUNDLED WITH
1.16.1
1.16.4

View file

@ -8,11 +8,12 @@ gem "pry"
gem "pry-byebug"
gem "rake", "12.3.0"
gem "rspec", "~> 3.6"
gem "rubocop", require: false
gem "zeus", require: false
gem "yard"
gem "redcarpet"
gem "pygments.rb"
gem "fssm"
gem "pygments.rb"
gem "redcarpet"
gem "yard"
gem "activerecord-jdbc-adapter", platform: :jruby
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
gem "jdbc-sqlite3", platform: :jruby

View file

@ -45,6 +45,7 @@ GEM
rake
thor (>= 0.14.0)
arel (6.0.4)
ast (2.4.0)
bcrypt (3.1.11)
builder (3.2.3)
byebug (9.1.0)
@ -66,6 +67,7 @@ GEM
globalid (0.4.0)
activesupport (>= 4.2.0)
i18n (0.8.6)
jaro_winkler (1.5.1-x86_64-darwin-17)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
@ -93,7 +95,11 @@ GEM
multi_json (1.12.2)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
parallel (1.12.1)
parser (2.5.1.2)
ast (~> 2.4.0)
pg (0.21.0)
powerpack (0.1.2)
protected_attributes (1.0.9)
activemodel (>= 4.0.1, < 5.0)
pry (0.11.3)
@ -133,6 +139,7 @@ GEM
activesupport (= 4.2.10)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (3.0.0)
rake (12.3.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
@ -160,6 +167,14 @@ GEM
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
rubocop (0.59.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
sass (3.5.2)
sass-listen (~> 4.0.0)
@ -198,6 +213,7 @@ GEM
thread_safe (~> 0.1)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.4.0)
yard (0.9.9)
zeus (0.15.14)
method_source (>= 0.6.7)
@ -230,6 +246,7 @@ DEPENDENCIES
redcarpet
rspec (~> 3.6)
rspec-rails (~> 3.6)
rubocop
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
shoulda-context (~> 1.2.0)
@ -243,4 +260,4 @@ DEPENDENCIES
zeus
BUNDLED WITH
1.16.1
1.16.4

View file

@ -8,11 +8,12 @@ gem "pry"
gem "pry-byebug"
gem "rake", "12.3.0"
gem "rspec", "~> 3.6"
gem "rubocop", require: false
gem "zeus", require: false
gem "yard"
gem "redcarpet"
gem "pygments.rb"
gem "fssm"
gem "pygments.rb"
gem "redcarpet"
gem "yard"
gem "activerecord-jdbc-adapter", platform: :jruby
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
gem "jdbc-sqlite3", platform: :jruby

View file

@ -44,6 +44,7 @@ GEM
rake
thor (>= 0.14.0)
arel (7.1.4)
ast (2.4.0)
bcrypt (3.1.11)
builder (3.2.3)
byebug (9.1.0)
@ -57,6 +58,7 @@ GEM
globalid (0.4.0)
activesupport (>= 4.2.0)
i18n (0.8.6)
jaro_winkler (1.5.1-x86_64-darwin-17)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
@ -87,7 +89,11 @@ GEM
nio4r (2.1.0)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
parallel (1.12.1)
parser (2.5.1.2)
ast (~> 2.4.0)
pg (0.21.0)
powerpack (0.1.2)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
@ -127,6 +133,7 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (3.0.0)
rake (12.3.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
@ -153,6 +160,14 @@ GEM
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
rubocop (0.59.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
sass (3.5.2)
sass-listen (~> 4.0.0)
@ -189,6 +204,7 @@ GEM
turbolinks-source (5.0.3)
tzinfo (1.2.3)
thread_safe (~> 0.1)
unicode-display_width (1.4.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
@ -223,6 +239,7 @@ DEPENDENCIES
redcarpet
rspec (~> 3.6)
rspec-rails (~> 3.6)
rubocop
sass-rails (~> 5.0)
shoulda-context (~> 1.2.0)
spring
@ -235,4 +252,4 @@ DEPENDENCIES
zeus
BUNDLED WITH
1.16.1
1.16.4

View file

@ -8,11 +8,12 @@ gem "pry"
gem "pry-byebug"
gem "rake", "12.3.0"
gem "rspec", "~> 3.6"
gem "rubocop", require: false
gem "zeus", require: false
gem "yard"
gem "redcarpet"
gem "pygments.rb"
gem "fssm"
gem "pygments.rb"
gem "redcarpet"
gem "yard"
gem "activerecord-jdbc-adapter", platform: :jruby
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
gem "jdbc-sqlite3", platform: :jruby

View file

@ -46,6 +46,7 @@ GEM
rake
thor (>= 0.14.0)
arel (8.0.0)
ast (2.4.0)
bcrypt (3.1.12)
builder (3.2.3)
byebug (10.0.2)
@ -69,6 +70,7 @@ GEM
activesupport (>= 4.2.0)
i18n (1.1.0)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.1)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
@ -94,7 +96,11 @@ GEM
nio4r (2.3.1)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
parallel (1.12.1)
parser (2.5.1.2)
ast (~> 2.4.0)
pg (1.1.3)
powerpack (0.1.2)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
@ -135,6 +141,7 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (3.0.0)
rake (12.3.0)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
@ -161,6 +168,14 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubocop (0.59.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.10.0)
ruby_dep (1.5.0)
rubyzip (1.2.2)
@ -202,6 +217,7 @@ GEM
turbolinks-source (5.2.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.4.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
@ -238,6 +254,7 @@ DEPENDENCIES
redcarpet
rspec (~> 3.6)
rspec-rails (~> 3.6)
rubocop
sass-rails (~> 5.0)
selenium-webdriver
shoulda-context (~> 1.2.0)

View file

@ -8,11 +8,12 @@ gem "pry"
gem "pry-byebug"
gem "rake", "12.3.0"
gem "rspec", "~> 3.6"
gem "rubocop", require: false
gem "zeus", require: false
gem "yard"
gem "redcarpet"
gem "pygments.rb"
gem "fssm"
gem "pygments.rb"
gem "redcarpet"
gem "yard"
gem "activerecord-jdbc-adapter", platform: :jruby
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
gem "jdbc-sqlite3", platform: :jruby

View file

@ -52,6 +52,7 @@ GEM
archive-zip (0.11.0)
io-like (~> 0.3.0)
arel (9.0.0)
ast (2.4.0)
bcrypt (3.1.12)
bootsnap (1.3.1)
msgpack (~> 1.0)
@ -81,6 +82,7 @@ GEM
i18n (1.1.0)
concurrent-ruby (~> 1.0)
io-like (0.3.0)
jaro_winkler (1.5.1-x86_64-darwin-17)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
@ -110,7 +112,11 @@ GEM
nio4r (2.3.1)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
parallel (1.12.1)
parser (2.5.1.2)
ast (~> 2.4.0)
pg (1.1.2)
powerpack (0.1.2)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
@ -152,6 +158,7 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (12.3.0)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
@ -178,6 +185,14 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubocop (0.59.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.10.0)
ruby_dep (1.5.0)
rubyzip (1.2.2)
@ -219,6 +234,7 @@ GEM
turbolinks-source (5.2.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.4.0)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
@ -257,6 +273,7 @@ DEPENDENCIES
redcarpet
rspec (~> 3.6)
rspec-rails (~> 3.6)
rubocop
sass-rails (~> 5.0)
selenium-webdriver
shoulda-context (~> 1.2.0)
@ -270,4 +287,4 @@ DEPENDENCIES
zeus
BUNDLED WITH
1.16.1
1.16.4