Skip to content

Commit

Permalink
Updated RuboCop Rules (#67)
Browse files Browse the repository at this point in the history
* standardize rubocop rules

* lint

* lint

* fix tests

* sort config

* update changelog

* update rubocop

* remove new rules

* downgrade rubocop-ast

* revert changes to GemFile
  • Loading branch information
mldangelo committed Apr 1, 2024
1 parent 0b7d725 commit 04a873b
Show file tree
Hide file tree
Showing 28 changed files with 706 additions and 519 deletions.
189 changes: 181 additions & 8 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,149 @@
---

require:
- rubocop-rake
- rubocop-rspec
- rubocop-rake
- rubocop-rspec

AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 2.6
NewCops: enable

Bundler/DuplicatedGem:
Enabled: true

Bundler/GemFilename:
Enabled: true

Layout/ArgumentAlignment:
Enabled: true
EnforcedStyle: with_fixed_indentation

Layout/ArrayAlignment:
Enabled: true

Layout/AssignmentIndentation:
Enabled: true

Layout/BlockAlignment:
Enabled: true

Layout/CaseIndentation:
Enabled: true

Layout/ConditionPosition:
Enabled: true

Layout/ElseAlignment:
Enabled: true

Layout/EmptyLineAfterGuardClause:
Enabled: true

Layout/EmptyLineAfterMagicComment:
Enabled: true

Layout/EmptyLinesAroundBlockBody:
Enabled: true

Layout/EmptyLinesAroundClassBody:
Enabled: true

Layout/EmptyLinesAroundModuleBody:
Enabled: true

Layout/EndAlignment:
Enabled: true

Layout/EndOfLine:
Enabled: true

Layout/ExtraSpacing:
Enabled: true
ForceEqualSignAlignment: false
AllowForAlignment: false

Layout/FirstArgumentIndentation:
Enabled: true
EnforcedStyle: consistent

Layout/FirstArrayElementIndentation:
Enabled: true
EnforcedStyle: consistent

Layout/FirstHashElementIndentation:
Enabled: true
EnforcedStyle: consistent

Layout/HashAlignment:
Enabled: true

Layout/IndentationConsistency:
Enabled: true

Layout/IndentationStyle:
Enabled: true

Layout/IndentationWidth:
Enabled: true

Layout/LeadingEmptyLines:
Enabled: true

Layout/MultilineBlockLayout:
Enabled: true

Layout/MultilineMethodCallIndentation:
Enabled: true
EnforcedStyle: indented

Layout/MultilineOperationIndentation:
Enabled: true
EnforcedStyle: indented

Layout/ParameterAlignment:
Enabled: true

Layout/SpaceAfterComma:
Enabled: true

Layout/SpaceAroundKeyword:
Enabled: true

Layout/SpaceAroundOperators:
Enabled: true

Layout/SpaceBeforeBlockBraces:
Enabled: true

Layout/SpaceBeforeFirstArg:
Enabled: true

Layout/SpaceInsideBlockBraces:
Enabled: true

Layout/SpaceInsideParens:
Enabled: true

Layout/TrailingEmptyLines:
Enabled: true

Layout/TrailingWhitespace:
Enabled: true

Lint/AmbiguousAssignment:
Enabled: true

Lint/AmbiguousBlockAssociation:
Enabled: true

Lint/AmbiguousOperator:
Enabled: true

Lint/AmbiguousRange:
Enabled: true

Lint/DuplicateElsifCondition:
Enabled: true

Metrics/AbcSize:
Max: 30
Expand All @@ -24,7 +164,8 @@ Naming/FileName:
Enabled: false

RSpec/ExampleLength:
Enabled: false
Enabled: true
Max: 150

RSpec/FilePath:
Enabled: false
Expand All @@ -33,13 +174,45 @@ RSpec/InstanceVariable:
Enabled: false

RSpec/MultipleExpectations:
Enabled: false
Enabled: true
Max: 10

RSpec/MultipleMemoizedHelpers:
Enabled: false

RSpec/NestedGroups:
Enabled: false
Enabled: true
Max: 4

RSpec/RepeatedExampleGroupDescription:
RSpec/NoExpectationExample:
Enabled: false

Style/RedundantBegin:
Enabled: true

Style/RedundantCondition:
Enabled: true

Style/RedundantInterpolation:
Enabled: true

Style/RedundantParentheses:
Enabled: true

Style/RedundantReturn:
Enabled: true

Style/StringLiterals:
Enabled: true

Style/TrailingCommaInArguments:
Enabled: true
EnforcedStyleForMultiline: comma

Style/TrailingCommaInArrayLiteral:
Enabled: true
EnforcedStyleForMultiline: comma

Style/TrailingCommaInHashLiteral:
Enabled: true
EnforcedStyleForMultiline: comma
Loading

0 comments on commit 04a873b

Please sign in to comment.