Skip to content

Commit

Permalink
Cleanup the rubocop config
Browse files Browse the repository at this point in the history
Go back to rubocop 0.80 for Ruby 2.3 support.
Stop depending on the company style guide, as it needs a newer
rubocop.
  • Loading branch information
byroot committed Jan 13, 2022
1 parent 12ee08b commit b277e75
Show file tree
Hide file tree
Showing 49 changed files with 790 additions and 800 deletions.
150 changes: 144 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
inherit_from: .rubocop_todo.yml

inherit_gem:
rubocop-shopify: rubocop.yml

AllCops:
Exclude:
- 'vendor/**/*'
- 'tmp/**/*'
TargetRubyVersion: 2.5
TargetRubyVersion: 2.3

# This doesn't take into account retrying from an exception
Lint/SuppressedException:
Expand All @@ -17,6 +12,149 @@ Lint/SuppressedException:
Style/EmptyLiteral:
Enabled: false

Style/EmptyMethod:
Enabled: false

# allow the use of globals which makes sense in a CLI app like this
Style/GlobalVars:
Enabled: false

Style/PercentLiteralDelimiters:
Enabled: false

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma

Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma

Layout/LineLength:
Max: 120

Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma

Metrics/AbcSize:
Enabled: false

Metrics/MethodLength:
Enabled: false

Metrics/BlockLength:
Enabled: false

Metrics/ClassLength:
Enabled: false

Metrics/CyclomaticComplexity:
Enabled: false

Metrics/ModuleLength:
Enabled: false

Metrics/ParameterLists:
Enabled: false

Metrics/PerceivedComplexity:
Enabled: false

Naming/MethodName:
Exclude:
- 'test/**/*'

Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space

Naming/RescuedExceptionsVariableName:
PreferredName: error

Bundler/OrderedGems:
Enabled: false

Gemspec/OrderedDependencies:
Enabled: false

Gemspec/DuplicatedAssignment:
Enabled: false

Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented

Style/SymbolArray:
Enabled: false

Style/StderrPuts:
Enabled: false

Style/ModuleFunction:
Enabled: false

Style/IfUnlessModifier:
Enabled: false

Style/GuardClause:
Enabled: false

Layout/EndAlignment:
EnforcedStyleAlignWith: start_of_line

Layout/RescueEnsureAlignment:
Enabled: false

Layout/FirstHashElementIndentation:
EnforcedStyle: consistent

Style/NumericPredicate:
Enabled: false

Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space

Lint/AssignmentInCondition:
AllowSafeAssignment: true

Lint/UnusedMethodArgument:
AllowUnusedKeywordArguments: true

Security/MarshalLoad:
Enabled: false

Security/YAMLLoad:
Enabled: false

Style/Alias:
EnforcedStyle: prefer_alias_method

Style/Documentation:
Enabled: false

Style/DoubleNegation:
Enabled: false

Style/CommentedKeyword:
Enabled: false

Naming/VariableNumber:
Enabled: false

Style/Next:
Enabled: false

Style/StringLiterals:
EnforcedStyle: double_quotes


Lint/RaiseException:
Enabled: true

Lint/StructNewOverride:
Enabled: true

Style/HashEachMethods:
Enabled: true

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true
213 changes: 0 additions & 213 deletions .rubocop_todo.yml

This file was deleted.

9 changes: 5 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true
source 'https://rubygems.org'

source "https://rubygems.org"

# Specify your gem's dependencies in bootsnap.gemspec
gemspec
Expand All @@ -9,7 +10,7 @@ if ENV["PSYCH_4"]
end

group :development do
gem 'rubocop'
gem 'rubocop-shopify', require: false
gem 'byebug', platform: :ruby
gem "rubocop", "0.81.0" # Ruby 2.3 support
gem "rubocop-shopify", require: false
gem "byebug", platform: :ruby
end

0 comments on commit b277e75

Please sign in to comment.