Skip to content

Commit

Permalink
Add initial Rubocop configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Dec 2, 2020
1 parent 44d1290 commit 59c4aed
Show file tree
Hide file tree
Showing 14 changed files with 915 additions and 21 deletions.
134 changes: 134 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
inherit_from: .rubocop_todo.yml

AllCops:
Exclude:
- 'Gemfile'
- 'Rakefile'
- 'test/**/*'
- 'modules/**/*'

Bundler/OrderedGems:
Enabled: false

Layout/HashAlignment:
Enabled: false

Layout/ParameterAlignment:
Enabled: false

Layout/DotPosition:
Enabled: false

Metrics:
Enabled: false

Naming/FileName:
Enabled: false

Style/Alias:
EnforcedStyle: prefer_alias_method

Style/AndOr:
EnforcedStyle: conditionals

# Don't prefer is_a? over kind_of?
Style/ClassCheck:
Enabled: false

# Don't enforce certain methods, e.g. detect over find
Style/CollectionMethods:
Enabled: false

Style/ConditionalAssignment:
Enabled: false

# Don't enforce documentation
Style/Documentation:
Enabled: false

Style/EmptyMethod:
EnforcedStyle: expanded

# Don't enforce frozen string literals
Style/FrozenStringLiteralComment:
Enabled: false

Style/GuardClause:
Enabled: false

Style/HashEachMethods:
Enabled: true

# Support both, Ruby 1.9 hashmap and hash-rocket syntax
Style/HashSyntax:
Enabled: false

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true

Style/IfUnlessModifier:
Enabled: false

Style/InverseMethods:
Enabled: false

# disabled until we can configure "+" as concat sign
Style/LineEndConcatenation:
Enabled: false

# Won't work with sqlite
Style/MultipleComparison:
Enabled: false

Style/ParallelAssignment:
Enabled: false

Style/ParenthesesAroundCondition:
Enabled: false

Style/PreferredHashMethods:
Enabled: false

# Both double and single quotes are OK
Style/StringLiterals:
Enabled: false

Style/TernaryParentheses:
EnforcedStyle: require_parentheses_when_complex

Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma

#Allow both ['a', 'b'], %w[a b] and %w(a b) style arrays
Style/WordArray:
Enabled: false

Layout/LineLength:
Enabled: false

Style/SafeNavigation:
Enabled: false

Style/StderrPuts:
Enabled: false

Lint/SendWithMixinArgument:
Enabled: false

Style/NumericPredicate:
Enabled: false

Layout/HeredocIndentation:
Enabled: false

Layout/SpaceInsideHashLiteralBraces:
Enabled: false

Style/RaiseArgs:
Enabled: false
Loading

0 comments on commit 59c4aed

Please sign in to comment.