Skip to content

Commit

Permalink
Merge pull request #11 from wundertax/bump
Browse files Browse the repository at this point in the history
Update with defaults from studyclever
  • Loading branch information
mhenrixon authored Mar 9, 2020
2 parents 88dce4c + a43063f commit a37e7cc
Showing 1 changed file with 160 additions and 19 deletions.
179 changes: 160 additions & 19 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,109 @@ inherit_mode:
AllCops:
TargetRubyVersion: 2.5

Naming/PredicateName:
NamePrefix:
- is_
AllowedMethods:
- is_a?
Exclude:
- 'spec/**/*'
# =============== #
# Layout Cops #
# =============== #

Layout/TrailingEmptyLines:
EnforcedStyle: final_newline
Layout/ArgumentAlignment:
Enabled: true
EnforcedStyle: with_first_argument

Layout/CaseIndentation:
EnforcedStyle: end
AutoCorrect: true

Layout/EndAlignment:
EnforcedStyleAlignWith: start_of_line
AutoCorrect: true

Layout/EndOfLine:
Enabled: true
EnforcedStyle: lf

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

Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent

Layout/FirstHashElementIndentation:
EnforcedStyle: consistent

Layout/LineLength:
Max: 120
AutoCorrect: false
AllowHeredoc: true
AllowURI: true
URISchemes:
- http
- https
Exclude:
- spec/**/*.rb
IgnoreCopDirectives: false
IgnoredPatterns:
- '\A\s*(remote_)?test(_\w+)?\s.*(do|->)(\s|\Z)'
- '\A\s*(remote_)?test(_\w+)?\s.*(do|->)(\s|\Z)'
Max: 130
URISchemes:
- http
- https

Layout/TrailingEmptyLines:
EnforcedStyle: final_newline

# ================ #
# Linter Cops #
# ================ #

Lint/AmbiguousBlockAssociation:
Enabled: true
Exclude:
- spec/**/*_spec.rb

# TODO: Fix this one
Lint/UriEscapeUnescape:
Enabled: false

# ================ #
# Metrics Cops #
# ================ #

Metrics/BlockLength:
Exclude:
- '**/spec/**/*_spec.rb'
- '**/spec/support/shared_examples*'
- '*.gemspec'
- config/environment/*.rb
- config/initializers/*.rb
- spec/**/*.rb

Metrics/ParameterLists:
Max: 5
CountKeywordArgs: false

# ================ #
# Naming Cops #
# ================ #

Naming/PredicateName:
NamePrefix:
- is_
AllowedMethods:
- is_a?
Exclude:
- 'spec/**/*'

Naming/VariableNumber:
EnforcedStyle: non_integer

# ================ #
# Rails Cops #
# ================ #

Rails/ActiveRecordAliases:
Enabled: true
Exclude:
- lib/forms/**/*.rb
- spec/lib/forms/**/*.rb

Rails/HttpPositionalArguments:
Include:
- spec/**/*
Expand All @@ -44,6 +121,65 @@ Rails/HttpPositionalArguments:
Rails/OutputSafety:
Enabled: true

Rails/SkipsModelValidations:
Enabled: true
Exclude:
- lib/tasks/**/*.rake
- spec/**/*.rb

# ================ #
# RSpec Cops #
# ================ #

RSpec/ContextWording:
Enabled: false
Prefixes:
- and
- but
- for
- if
- in
- unless
- when
- with
- without

RSpec/DescribeClass:
Exclude:
- spec/tasks/**/*_spec.rb
- spec/requests/**/*_spec.rb
- spec/routing/**/*_spec.rb
- spec/system/**/*_spec.rb

RSpec/EmptyExampleGroup:
Exclude:
- spec/api/**/*_spec.rb

RSpec/ExpectChange:
Enabled: false

RSpec/MessageSpies:
Enabled: false

RSpec/MultipleExpectations:
Enabled: true

RSpec/NamedSubject:
Enabled: false

RSpec/NestedGroups:
Max: 6

# =============== #
# Style Cops #
# =============== #

Style/Documentation:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Style/HashEachMethods:
Enabled: true

Expand All @@ -59,14 +195,19 @@ Style/ModuleFunction:
Lint/OrderedMagicComments:
Enabled: true

Metrics/BlockLength:
Exclude:
- '**/spec/**/*_spec.rb'
- '**/spec/support/shared_examples*'
- '*.gemspec'
Style/PercentLiteralDelimiters:
Enabled: true

Style/SymbolArray:
EnforcedStyle: percent

Style/TrailingCommaInArrayLiteral:
Enabled: true
EnforcedStyleForMultiline: comma

Style/TrailingCommaInHashLiteral:
Enabled: true
EnforcedStyleForMultiline: comma

Style/WordArray:
EnforcedStyle: percent

0 comments on commit a37e7cc

Please sign in to comment.