Skip to content

Commit

Permalink
Defaults to enabling rubocop cops
Browse files Browse the repository at this point in the history
Explicitly pardons and builds a todo list of existing offences, with a view to correcting them over time.
  • Loading branch information
benlangfeld committed Nov 7, 2018
1 parent 02a293c commit 16263bb
Show file tree
Hide file tree
Showing 2 changed files with 662 additions and 172 deletions.
175 changes: 3 additions & 172 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,185 +1,16 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.4
DisabledByDefault: true

# Prefer &&/|| over and/or.
Style/AndOr:
Enabled: true

Layout/BlockAlignment:
Enabled: true

# Do not use braces for hash literals when they are the last argument of a
# method call.
Style/BracesAroundHashParameters:
Enabled: true

# Align `when` with `case`.
Layout/CaseIndentation:
Enabled: true

# Align comments with method definitions.
Layout/CommentIndentation:
Enabled: true

# No extra empty lines.
Layout/EmptyLines:
Enabled: true
DisabledByDefault: false

# Align `end` with the matching keyword or starting expression except for
# assignments, where it should be aligned with the LHS.
Layout/EndAlignment:
Enabled: true
EnforcedStyleAlignWith: variable

# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
Style/HashSyntax:
Enabled: true

# Two spaces, no tabs (for indentation).
Layout/IndentationWidth:
Enabled: true

Layout/SpaceAfterColon:
Enabled: true

Layout/SpaceAfterComma:
Enabled: true

Layout/SpaceAfterNot:
Enabled: true

Layout/SpaceAroundBlockParameters:
Enabled: true

Layout/SpaceAroundEqualsInParameterDefault:
Enabled: true

Layout/SpaceAroundKeyword:
Enabled: true

Layout/SpaceAroundOperators:
Enabled: true

Layout/SpaceBeforeComma:
Enabled: true

Layout/SpaceBeforeFirstArg:
Enabled: true

# Defining a method with parameters needs parentheses.
Style/MethodDefParentheses:
Enabled: true

# Use `foo {}` not `foo{}`.
Layout/SpaceBeforeBlockBraces:
Enabled: true

Layout/SpaceInsideArrayLiteralBrackets:
Enabled: true

# Use `foo { bar }` not `foo {bar}`.
Layout/SpaceInsideBlockBraces:
Enabled: true

# Use `{ a: 1 }` not `{a:1}`.
Layout/SpaceInsideHashLiteralBraces:
Enabled: true

Layout/SpaceInsideParens:
Enabled: true

# Detect hard tabs, no hard tabs.
Layout/Tab:
Enabled: true

# Blank lines should not have any spaces.
Layout/TrailingBlankLines:
Enabled: true

# No trailing whitespace.
Layout/TrailingWhitespace:
Enabled: true

# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
Lint/RequireParentheses:
Enabled: true

Layout/MultilineMethodCallIndentation:
Enabled: true
EnforcedStyle: indented

Layout/AlignHash:
Enabled: true

Bundler/OrderedGems:
Enabled: false

Layout/ExtraSpacing:
Enabled: true

Layout/LeadingCommentSpace:
Enabled: true

Layout/EmptyLineAfterGuardClause:
Enabled: true

Layout/EmptyLineAfterMagicComment:
Enabled: true

Layout/EmptyLineBetweenDefs:
Enabled: true

Layout/EmptyLinesAroundAccessModifier:
Enabled: true

Layout/EmptyLinesAroundBlockBody:
Enabled: true

Layout/EmptyLinesAroundClassBody:
Enabled: true

Layout/EmptyLinesAroundExceptionHandlingKeywords:
Enabled: true

Layout/EmptyLinesAroundMethodBody:
Enabled: true

Layout/EmptyLinesAroundModuleBody:
Enabled: true

Layout/AlignParameters:
Enabled: true

Layout/ClosingParenthesisIndentation:
Enabled: true

Layout/IndentHeredoc:
Enabled: true

Layout/IndentationConsistency:
Enabled: true

Layout/MultilineMethodCallBraceLayout:
Enabled: true

Layout/MultilineOperationIndentation:
Enabled: true

Lint/UselessAssignment:
Enabled: true

Lint/UnusedMethodArgument:
Enabled: true

Lint/UnusedBlockArgument:
Enabled: true

Style/MethodCallWithoutArgsParentheses:
Enabled: true

Lint/ParenthesesAsGroupedExpression:
Enabled: true

Lint/DuplicateMethods:
Enabled: true
Loading

0 comments on commit 16263bb

Please sign in to comment.