Skip to content

Commit

Permalink
Style change to use house rubocops
Browse files Browse the repository at this point in the history
  • Loading branch information
bermannoah committed Apr 27, 2022
1 parent 1723131 commit 6e43177
Show file tree
Hide file tree
Showing 9 changed files with 486 additions and 185 deletions.
315 changes: 309 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,314 @@
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
require: rubocop-performance

Metrics/MethodLength:
Max: 16
AllCops:
NewCops: enable
Exclude:
- 'spec/fixtures/*'

# https://github.com/cookpad/global-style-guides/blob/main/.rubocop.ruby.yml

Bundler/OrderedGems:
ConsiderPunctuation: true

Metrics/BlockLength:
Exclude:
- spec/**/*.rb
- config/**/*.rb
- db/migrate/*.rb
- lib/tasks/**/*.rake
- Gemfile

Layout/LineLength:
AllowHeredoc: true
AllowURI: true
Max: 120
Exclude:
- Gemfile
- spec/**/*

Metrics/ModuleLength:
Exclude:
- spec/**/*

Naming/AccessorMethodName:
Enabled: false

Style/Alias:
Enabled: false

Style/ArrayJoin:
Enabled: false

Style/AsciiComments:
Enabled: false

Naming/AsciiIdentifiers:
Enabled: false

Style/Attr:
Enabled: false

Metrics/BlockNesting:
Enabled: false

Style/CaseEquality:
Enabled: false

Style/CharacterLiteral:
Enabled: false

Style/ClassAndModuleChildren:
Enabled: false

Metrics/ClassLength:
Enabled: false

Style/ClassVars:
Enabled: false

Style/CollectionMethods:
PreferredMethods:
find: false
reduce: inject
collect: map
find_all: false

Style/ColonMethodCall:
Enabled: false

Style/CommentAnnotation:
Enabled: false

Metrics/CyclomaticComplexity:
Enabled: false

Style/Documentation:
Enabled: false

Metrics/LineLength:
Max: 120
Layout/DotPosition:
EnforcedStyle: trailing

Style/DoubleNegation:
Enabled: false

Style/EachWithObject:
Enabled: false

Style/EmptyLiteral:
Enabled: false

Style/Encoding:
Enabled: false

Style/EvenOdd:
Enabled: false

Naming/FileName:
Enabled: false

Lint/FlipFlop:
Enabled: false

Style/FormatString:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Style/GlobalVars:
Enabled: false

Style/GuardClause:
Enabled: false

Style/IfUnlessModifier:
Enabled: false

Style/IfWithSemicolon:
Enabled: false

Layout/IndentationConsistency:
EnforcedStyle: indented_internal_methods

Style/InlineComment:
Enabled: false

Style/Lambda:
Enabled: false

Style/LambdaCall:
Enabled: false

Style/LineEndConcatenation:
Enabled: false

Metrics/MethodLength:
Enabled: false

Style/ModuleFunction:
Enabled: false

Style/NegatedIf:
EnforcedStyle: both

Style/NegatedWhile:
Enabled: false

Style/Next:
Enabled: false

Style/NilComparison:
Enabled: false

Style/NumericLiterals:
Enabled: false

Style/OneLineConditional:
Enabled: false

Style/ParallelAssignment:
Enabled: false

Metrics/ParameterLists:
Enabled: false

Style/PerlBackrefs:
Enabled: false

Naming/PredicateName:
ForbiddenPrefixes:
- is_

Style/Proc:
Enabled: false

Style/RaiseArgs:
Enabled: false

Style/RegexpLiteral:
Enabled: false

Style/SelfAssignment:
Enabled: false

Style/SingleLineBlockParams:
Enabled: false

Style/SingleLineMethods:
Enabled: false

Style/SignalException:
Enabled: false

Style/SpecialGlobalVars:
Enabled: false

Style/StringLiterals:
EnforcedStyle: double_quotes

Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: no_comma

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: no_comma

Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: no_comma

Style/FormatStringToken:
EnforcedStyle: template

Style/TrivialAccessors:
Enabled: false

Lint/UnusedMethodArgument:
Enabled: false

Naming/VariableNumber:
Enabled: false

Style/VariableInterpolation:
Enabled: false

Style/WhenThen:
Enabled: false

Style/WhileUntilModifier:
Enabled: false

Style/WordArray:
Enabled: false

Lint/AmbiguousOperator:
Enabled: false

Lint/AmbiguousRegexpLiteral:
Enabled: false

Lint/AssignmentInCondition:
Enabled: false

Layout/ConditionPosition:
Enabled: false

Lint/DeprecatedClassMethods:
Enabled: false

Lint/ElseLayout:
Enabled: false

Lint/SuppressedException:
Enabled: false

Lint/LiteralInInterpolation:
Enabled: false

Lint/Loop:
Enabled: false

Lint/ParenthesesAsGroupedExpression:
Enabled: false

Lint/RequireParentheses:
Enabled: false

Lint/UnderscorePrefixedVariableName:
Enabled: false

Lint/MissingSuper:
Enabled: false

Lint/UselessAssignment:
Exclude:
- spec/**/*

Layout/ArgumentAlignment:
EnforcedStyle: with_fixed_indentation

Layout/EmptyLines:
Exclude:
- spec/**/*

Style/NumericPredicate:
EnforcedStyle: comparison

Style/PercentLiteralDelimiters:
PreferredDelimiters:
"%": ()
"%i": ()
"%q": ()
"%Q": ()
"%r": "{}"
"%s": ()
"%w": ()
"%W": ()
"%x": ()

Naming/MemoizedInstanceVariableName:
EnforcedStyleForLeadingUnderscores: required

Performance/RedundantMerge:
Enabled: false

Performance/TimesMap:
Enabled: false
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# frozen_string_literal: true

source 'https://rubygems.org'
source "https://rubygems.org"

group :development do
gem 'brakeman'
gem 'rubocop'
gem "brakeman"
gem "rubocop"
end

group :test do
gem 'pry'
gem 'rspec'
gem 'webmock'
gem "pry"
gem "rspec"
gem "webmock"
end
Loading

0 comments on commit 6e43177

Please sign in to comment.