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

Fix rubocop config to remove error messages #8526

Closed
wants to merge 7 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Metrics/ParameterLists:
Style/StringLiterals:
Enabled: false

Metrics/LineLength:
Layout/LineLength:
Max: 423

Style/Documentation:
Expand Down
60 changes: 25 additions & 35 deletions .rubocop_shopify_styleguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Style/Alias:
- prefer_alias
- prefer_alias_method

Layout/AlignHash:
Layout/HashAlignment:
EnforcedHashRocketStyle: key
EnforcedColonStyle: key
EnforcedLastArgumentHashStyle: ignore_implicit
Expand All @@ -23,7 +23,7 @@ Layout/AlignHash:
- ignore_implicit
- ignore_explicit

Layout/AlignParameters:
Layout/ParameterAlignment:
EnforcedStyle: with_fixed_indentation
SupportedStyles:
- with_first_parameter
Expand Down Expand Up @@ -69,13 +69,6 @@ Style/BlockDelimiters:
- proc
- it

Style/BracesAroundHashParameters:
EnforcedStyle: no_braces
SupportedStyles:
- braces
- no_braces
- context_dependent

Layout/CaseIndentation:
EnforcedStyle: end
SupportedStyles:
Expand Down Expand Up @@ -157,7 +150,7 @@ Naming/FileName:
Regex:
IgnoreExecutableScripts: true

Layout/IndentFirstArgument:
Layout/FirstArgumentIndentation:
EnforcedStyle: consistent
SupportedStyles:
- consistent
Expand Down Expand Up @@ -197,18 +190,18 @@ Layout/IndentationConsistency:
Layout/IndentationWidth:
Width: 2

Layout/IndentFirstArrayElement:
Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent
SupportedStyles:
- special_inside_parentheses
- consistent
- align_brackets
IndentationWidth:

Layout/IndentAssignment:
Layout/AssignmentIndentation:
IndentationWidth:

Layout/IndentFirstHashElement:
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
SupportedStyles:
- special_inside_parentheses
Expand Down Expand Up @@ -311,9 +304,9 @@ Style/PercentQLiterals:
Naming/PredicateName:
NamePrefix:
- is_
NamePrefixBlacklist:
ForbiddenPrefixes:
- is_
NameWhitelist:
AllowedMethods:
- is_a?
Exclude:
- 'spec/**/*'
Expand Down Expand Up @@ -438,7 +431,7 @@ Style/TernaryParentheses:
- require_no_parentheses
AllowSafeAssignment: true

Layout/TrailingBlankLines:
Layout/TrailingEmptyLines:
EnforcedStyle: final_newline
SupportedStyles:
- final_newline
Expand All @@ -449,7 +442,7 @@ Style/TrivialAccessors:
AllowPredicates: true
AllowDSLWriters: false
IgnoreClassMethods: false
Whitelist:
AllowedMethods:
- to_ary
- to_a
- to_c
Expand Down Expand Up @@ -600,7 +593,7 @@ Rails/Validation:
Naming/AccessorMethodName:
Enabled: true

Layout/AlignArray:
Layout/ArrayAlignment:
Enabled: true

Style/ArrayJoin:
Expand Down Expand Up @@ -837,7 +830,7 @@ Layout/SpaceInsideRangeLiteral:
Style/SymbolLiteral:
Enabled: true

Layout/Tab:
Layout/IndentationStyle:
Enabled: true

Layout/TrailingWhitespace:
Expand All @@ -846,13 +839,13 @@ Layout/TrailingWhitespace:
Style/UnlessElse:
Enabled: true

Style/UnneededCapitalW:
Style/RedundantCapitalW:
Enabled: true

Style/UnneededInterpolation:
Style/RedundantInterpolation:
Enabled: true

Style/UnneededPercentQ:
Style/RedundantPercentQ:
Enabled: true

Style/VariableInterpolation:
Expand All @@ -867,8 +860,8 @@ Style/WhileUntilDo:
Style/ZeroLengthPredicate:
Enabled: true

Layout/IndentHeredoc:
EnforcedStyle: squiggly
Layout/HeredocIndentation:
Enabled: true

Lint/AmbiguousOperator:
Enabled: true
Expand All @@ -891,7 +884,7 @@ Lint/DeprecatedClassMethods:
Lint/DuplicateMethods:
Enabled: true

Lint/DuplicatedKey:
Lint/DuplicateHashKey:
Enabled: true

Lint/EachWithObjectArgument:
Expand All @@ -906,9 +899,6 @@ Lint/EmptyEnsure:
Lint/EmptyInterpolation:
Enabled: true

Lint/EndInMethod:
Enabled: true

Lint/EnsureReturn:
Enabled: true

Expand All @@ -918,7 +908,7 @@ Lint/FloatOutOfRange:
Lint/FormatParameterMismatch:
Enabled: true

Lint/HandleExceptions:
Lint/SuppressedException:
Enabled: true

Lint/ImplicitStringConcatenation:
Expand Down Expand Up @@ -974,7 +964,7 @@ Lint/ShadowedException:
Lint/ShadowingOuterLocalVariable:
Enabled: true

Lint/StringConversionInInterpolation:
Lint/RedundantStringCoercion:
Enabled: true

Lint/UnderscorePrefixedVariableName:
Expand All @@ -983,7 +973,7 @@ Lint/UnderscorePrefixedVariableName:
Lint/UnifiedInteger:
Enabled: true

Lint/UnneededSplatExpansion:
Lint/RedundantSplatExpansion:
Enabled: true

Lint/UnreachableCode:
Expand All @@ -992,7 +982,7 @@ Lint/UnreachableCode:
Lint/UselessAccessModifier:
ContextCreatingMethods: []

Lint/UselessComparison:
Lint/BinaryOperatorWithIdenticalOperands:
Enabled: true

Lint/UselessElseWithoutRescue:
Expand All @@ -1008,10 +998,10 @@ Performance/CaseWhenSplat:
Enabled: true

Performance/Count:
SafeMode: true
SafeAutoCorrect: true

Performance/Detect:
SafeMode: true
SafeAutoCorrect: true

Performance/DoubleStartEndWith:
Enabled: true
Expand All @@ -1025,7 +1015,7 @@ Performance/FixedSize:
Performance/FlatMap:
EnabledForFlattenWithoutParams: false

Performance/LstripRstrip:
Style/Strip:
Enabled: true

Performance/RangeInclude:
Expand Down
2 changes: 1 addition & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Naming/PredicateName:
# Offense count: 3
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at, ip, db
Naming/UncommunicativeMethodParamName:
Naming/MethodParameterName:
Exclude:
- 'app/models/doc_list.rb'

Expand Down