K-and-R/easy_captcha

View on GitHub
.rubocop.yml

Summary

Maintainability
Test Coverage
# The behavior of RuboCop can be controlled via the .rubocop.yml
# configuration file. It makes it possible to enable/disable
# certain cops (checks) and to alter their behavior if they accept
# any parameters. The file can be placed either in your home
# directory or in some project directory.
#
# RuboCop will start looking for the configuration file in the directory
# where the inspected file is and continue its way up to the root directory.
#
# See https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md
require:
  - rubocop-performance
  - rubocop-rspec

AllCops:
  NewCops: enable
  Exclude:
    - 'bin/*'
    - 'config.ru'
    # Many gems have their own initializers or default initializers
    # These may not align with our standards and also, likely should not be
    # modified. We will need to police ourselves on these files.
    - 'config/initializers/*.rb'
    # Since `schema.rb` is an auto-generated file, we should not be editing it
    - 'db/schema.rb'
    # Exclude vendor code
    - 'node_modules/**/*'
    - 'Rakefile'
    - 'spec/fixtures/**/*'
    - 'tmp/**/*'
    # Exclude vendor code
    - 'vendor/**/*'
  TargetRubyVersion: 2.5

Bundler/GemComment:
  Enabled: true

Bundler/OrderedGems:
  TreatCommentsAsGroupSeparators: true

Capybara/FeatureMethods:
  Enabled: true
  EnabledMethods:
    - feature
    - given
    - background
    - scenario

Layout/ArgumentAlignment:
  Enabled: true

Layout/BlockAlignment:
  Enabled: true

Style/BlockDelimiters:
  Enabled: true

Layout/BlockEndNewline:
  Enabled: true

Layout/ClassStructure:
  Enabled: true
  Categories:
    module_inclusion:
      - include
      - prepend
      - extend
  ExpectedOrder:
      - module_inclusion
      - constants
      - public_class_methods
      - initializer
      - instance_methods
      - protected_methods
      - private_methods

Layout/ClosingParenthesisIndentation:
  Enabled: true

Layout/EndOfLine:
  EnforcedStyle: lf

Layout/EmptyLineAfterGuardClause:
  Enabled: false

Layout/EmptyLinesAroundAttributeAccessor:
  Enabled: true

Layout/FirstArgumentIndentation:
  Enabled: true

Layout/FirstArrayElementIndentation:
  Enabled: true
  EnforcedStyle: consistent
  IndentationWidth: 2

Layout/FirstHashElementIndentation:
  Enabled: true
  EnforcedStyle: consistent

Layout/FirstParameterIndentation:
  Enabled: true
  EnforcedStyle: consistent

Layout/HashAlignment:
  Enabled: true

Layout/IndentationWidth:
  Enabled: true
  Width: 2

Layout/LineLength:
  AllowHeredoc: true
  AllowURI: true
  AutoCorrect: false
  Max: 120
  URISchemes:
    - http
    - https
    - mysql
    - mysql2
    - postgres
    - postgresql

Layout/MultilineArrayLineBreaks:
  Enabled: true

Layout/MultilineBlockLayout:
  Enabled: true

Layout/MultilineHashBraceLayout:
  Enabled: true

Layout/MultilineHashKeyLineBreaks:
  Enabled: true

Layout/MultilineMethodArgumentLineBreaks:
  Enabled: true

Layout/MultilineMethodCallBraceLayout:
  EnforcedStyle: new_line

Layout/ParameterAlignment:
  Enabled: true

Layout/SpaceAroundMethodCallOperator:
  Enabled: true

Lint/DeprecatedOpenSSLConstant:
  Enabled: true

Lint/DuplicateElsifCondition:
  Enabled: true

Lint/MixedRegexpCaptureTypes:
  Enabled: true

Lint/RaiseException:
  Enabled: true

Lint/StructNewOverride:
  Enabled: true

Metrics/BlockLength:
  Exclude:
    - 'Rakefile'
    - '**/*.rake'
    - 'spec/**/*.rb'
    - '**/*.gemspec'
  ExcludedMethods:
    - ActiveAdmin.register

Metrics/MethodLength:
  Max: 15

Metrics/ModuleLength:
  Exclude:
    - 'spec/**/*.rb'

Performance/AncestorsInclude:
  Enabled: true

Performance/BigDecimalWithNumericArgument:
  Enabled: true

Performance/RedundantSortBlock:
  Enabled: true

Performance/RedundantStringChars:
  Enabled: true

Performance/ReverseFirst:
  Enabled: true

Performance/SortReverse:
  Enabled: true

Performance/Squeeze:
  Enabled: true

Performance/StringInclude:
  Enabled: true

RSpec/PredicateMatcher:
  Strict: false
  EnforcedStyle: inflected

RSpec/ExampleLength:
  Max: 10

RSpec/NestedGroups:
  Max: 7

Style/AccessorGrouping:
  Enabled: true

Style/Alias:
  EnforcedStyle: prefer_alias_method

Style/ArrayCoercion:
  Enabled: false

Style/BisectedAttrAccessor:
  Enabled: true

Style/CaseLikeIf:
  Enabled: true

Style/DoubleNegation:
  Enabled: true

Style/ExponentialNotation:
  Enabled: true

Style/FrozenStringLiteralComment:
  Enabled: true

Style/HashAsLastArrayItem:
  Enabled: true

Style/HashEachMethods:
  Enabled: true

Style/HashLikeCase:
  Enabled: true

Style/HashTransformKeys:
  Enabled: true

Style/HashTransformValues:
  Enabled: true

Style/RedundantAssignment:
  Enabled: true

Style/RedundantFetchBlock:
  Enabled: true

Style/RedundantFileExtensionInRequire:
  Enabled: true

Style/RedundantRegexpCharacterClass:
  Enabled: true

Style/RedundantRegexpEscape:
  Enabled: true

Style/SignalException:
  EnforcedStyle: semantic

Style/SlicingWithRange:
  Enabled: true