Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding rubocop to standardize codebase #57

Merged
merged 1 commit into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
require: rubocop-performance

# Start with Spotifys style guide as a base then customize from there
inherit_from:
- .rubocop_shopify_styleguide.yml

# Apply rule to all cops
AllCops:
Include:
- '*/**/*.rb'
Exclude:
- 'spec/*'
- 'views/*'
TargetRubyVersion: '2.4'

# Offense count: 180
Metrics/AbcSize:
Max: 178

# Offense count: 13
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Max: 257

# Offense count: 24
# Configuration parameters: CountBlocks.
Metrics/BlockNesting:
Max: 6

# Offense count: 50
Metrics/CyclomaticComplexity:
Max: 28

# Offense count: 171
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength:
Max: 86

# Offense count: 2
# Configuration parameters: CountComments.
Metrics/ModuleLength:
Max: 347

# Offense count: 60
Metrics/PerceivedComplexity:
Max: 33

Layout/MultilineMethodCallIndentation:
Enabled: false

Style/RegexpLiteral:
Enabled: false

Style/IfInsideElse:
Enabled: false

Style/DateTime:
Enabled: false

Style/CaseEquality:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Lint/ParenthesesAsGroupedExpression:
Enabled: false

Layout/EndAlignment:
Enabled: false

Layout/DefEndAlignment:
Enabled: false

Lint/SafeNavigationChain:
Enabled: false

Lint/AssignmentInCondition:
Enabled: false

Naming/AccessorMethodName:
Enabled: false

Metrics/ClassLength:
Enabled: false

Metrics/ParameterLists:
Enabled: false

Style/StringLiterals:
Enabled: false

Metrics/LineLength:
Max: 423

Style/Documentation:
Enabled: false
Loading