Skip to content

Commit

Permalink
Adding latest rubocop settings
Browse files Browse the repository at this point in the history
  • Loading branch information
emaglio committed Jun 19, 2018
1 parent cade358 commit 8bc16f8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 20 deletions.
Expand Up @@ -71,3 +71,31 @@ Style/StringMethods:
Enabled: true
Style/SymbolArray:
Enabled: true
# this allows in rspec to have expect { } with multiple lines
Style/BlockDelimiters:
EnforcedStyle: braces_for_chaining
Layout/EndOfLine:
Enabled: false
# don't need these checks in test folders
Metrics/ModuleLength:
Exclude:
- "spec/**/*"
- "test/**/*"
Metrics/BlockLength:
Exclude:
- "spec/**/*"
- "test/**/*"
- "*.gemspec" # definitely not in the gemspec
Metrics/MethodLength:
Max: 20
Lint/UnreachableCode:
Description: 'Unreachable code.'
Enabled: false
Lint/Void:
Enabled: false
Layout/AlignHash:
EnforcedLastArgumentHashStyle: ignore_implicit
Metrics/AbcSize:
Max: 25
Style/LambdaCall:
Enabled: false
31 changes: 11 additions & 20 deletions .rubocop_todo.yml
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-06-03 16:45:22 +0800 using RuboCop version 0.56.0.
# on 2018-06-20 07:55:52 +0800 using RuboCop version 0.57.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -50,18 +50,10 @@ Layout/BlockEndNewline:
Exclude:
- 'lib/trailblazer/operation/module.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: IndentOneStep, IndentationWidth.
# SupportedStyles: case, end
Layout/CaseIndentation:
EnforcedStyle: end

# Offense count: 20
# Offense count: 19
# Cop supports --auto-correct.
Layout/CommentIndentation:
Exclude:
- 'lib/trailblazer/operation/input_output.rb'
- 'test/docs/fast_test.rb'
- 'test/docs/operation_test.rb'
- 'test/docs/trace_test.rb'
Expand All @@ -83,11 +75,10 @@ Layout/EmptyLineBetweenDefs:
- 'test/docs/fast_test.rb'
- 'test/test_helper.rb'

# Offense count: 18
# Offense count: 17
# Cop supports --auto-correct.
Layout/EmptyLines:
Exclude:
- 'Gemfile'
- 'test/benchmark.rb'
- 'test/docs/fast_test.rb'
- 'test/docs/operation_test.rb'
Expand Down Expand Up @@ -116,7 +107,7 @@ Layout/EmptyLinesAroundMethodBody:
Exclude:
- 'lib/trailblazer/operation/test.rb'

# Offense count: 26
# Offense count: 24
# Configuration parameters: EnforcedStyle.
# SupportedStyles: native, lf, crlf
Layout/EndOfLine:
Expand Down Expand Up @@ -150,14 +141,15 @@ Layout/IndentationConsistency:
Exclude:
- 'test/docs/operation_test.rb'

# Offense count: 11
# Offense count: 12
# Cop supports --auto-correct.
Layout/LeadingCommentSpace:
Exclude:
- 'test/docs/fast_test.rb'
- 'test/docs/operation_test.rb'
- 'test/dsl/contract_test.rb'
- 'test/variables_test.rb'
- 'trailblazer.gemspec'

# Offense count: 8
# Cop supports --auto-correct.
Expand Down Expand Up @@ -197,12 +189,13 @@ Layout/SpaceBeforeComma:
Exclude:
- 'test/variables_test.rb'

# Offense count: 3
# Offense count: 4
# Cop supports --auto-correct.
Layout/SpaceBeforeComment:
Exclude:
- 'lib/trailblazer/dsl.rb'
- 'test/dsl/contract_test.rb'
- 'trailblazer.gemspec'

# Offense count: 4
# Cop supports --auto-correct.
Expand Down Expand Up @@ -288,10 +281,9 @@ Lint/UnusedMethodArgument:
- 'test/docs/fast_test.rb'
- 'test/docs/trace_test.rb'

# Offense count: 4
# Offense count: 3
Lint/UselessAssignment:
Exclude:
- 'lib/trailblazer/operation/input_output.rb'
- 'test/deprecation/call_test.rb'
- 'test/deprecation/context_test.rb'

Expand All @@ -314,7 +306,7 @@ Metrics/CyclomaticComplexity:
Metrics/LineLength:
Max: 290

# Offense count: 4
# Offense count: 3
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 16
Expand Down Expand Up @@ -366,14 +358,13 @@ Style/BracesAroundHashParameters:
- 'test/docs/operation_test.rb'
- 'test/dsl/contract_test.rb'

# Offense count: 12
# Offense count: 11
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Exclude:
- 'lib/trailblazer/operation/auto_inject.rb'
- 'lib/trailblazer/operation/input_output.rb'
- 'lib/trailblazer/operation/module.rb'
- 'test/docs/fast_test.rb'
- 'test/docs/operation_test.rb'
Expand Down

0 comments on commit 8bc16f8

Please sign in to comment.