gi/tilt-handlebars

View on GitHub
.rubocop.yml

Summary

Maintainability
Test Coverage
require:
  - rubocop-performance
  - rubocop-rake
  - rubocop-rspec

AllCops:
  TargetRubyVersion: 2.6
  Exclude:
    - bin/**/*
    - vendor/**/*
  NewCops: enable

Gemspec/RequireMFA:
  Enabled: false

Layout/ArgumentAlignment:
  EnforcedStyle: with_fixed_indentation

Layout/BlockAlignment:
  EnforcedStyleAlignWith: start_of_block

Layout/CaseIndentation:
  # Disabled because IndentOneStep can't be configured for one-liner cases.
  # See: https://github.com/rubocop-hq/rubocop/issues/6447
  Enabled: false

Layout/ClassStructure:
  Enabled: true

Layout/EndAlignment:
  EnforcedStyleAlignWith: variable

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

Layout/FirstArgumentIndentation:
  EnforcedStyle: consistent

Layout/FirstArrayElementIndentation:
  EnforcedStyle: consistent

Layout/FirstArrayElementLineBreak:
  Enabled: true

Layout/FirstHashElementIndentation:
  EnforcedStyle: consistent

Layout/FirstHashElementLineBreak:
  Enabled: true

Layout/FirstMethodArgumentLineBreak:
  Enabled: false

Layout/FirstMethodParameterLineBreak:
  Enabled: true

Layout/HeredocArgumentClosingParenthesis:
  Enabled: true

Layout/LineLength:
  Max: 80

Layout/MultilineArrayLineBreaks:
  Enabled: true

Layout/MultilineHashKeyLineBreaks:
  Enabled: true

Layout/MultilineMethodArgumentLineBreaks:
  Enabled: true

# Layout/MultilineMethodCallBraceLayout:
#   EnforcedStyle: new_line

Layout/MultilineMethodCallIndentation:
  EnforcedStyle: indented

Layout/MultilineMethodDefinitionBraceLayout:
  EnforcedStyle: new_line

Layout/MultilineOperationIndentation:
  EnforcedStyle: indented

Layout/ParameterAlignment:
  EnforcedStyle: with_fixed_indentation

Lint/DuplicateBranch:
  Enabled: true

Lint/DuplicateRegexpCharacterClassElement:
  Enabled: true

Lint/EmptyBlock:
  Enabled: true
  AllowComments: true

Lint/EmptyClass:
  Enabled: true
  AllowComments: true

Lint/HeredocMethodCallPosition:
  Enabled: true

Lint/NoReturnInBeginEndBlocks:
  Enabled: true

Metrics/BlockLength:
  CountAsOne:
    - array
    - hash
    - heredoc
  Exclude:
    - "*.gemspec"
    - spec/**/*_spec.rb
    - test/**/*_test.rb

Metrics/ClassLength:
  CountAsOne:
    - array
    - hash
    - heredoc
  Max: 120

Metrics/MethodLength:
  CountAsOne:
    - array
    - hash
    - heredoc
  Max: 20

Metrics/ModuleLength:
  CountAsOne:
    - array
    - hash
    - heredoc

Metrics/ParameterLists:
  Max: 10

Naming/FileName:
  Exclude:
    - lib/tilt-handlebars.rb

RSpec/ExampleLength:
  CountAsOne:
    - array
    - hash
    - heredoc

RSpec/MultipleMemoizedHelpers:
  Max: 20

RSpec/NestedGroups:
  Max: 8

Style/BlockDelimiters:
  EnforcedStyle: semantic
  AllowBracesOnProceduralOneLiners: true

Style/Documentation:
  Enabled: false

Style/FrozenStringLiteralComment:
  Exclude:
    - "**/*.gemfile"

Style/StringLiterals:
  EnforcedStyle: double_quotes
  ConsistentQuotesInMultiline: true

Style/StringLiteralsInInterpolation:
  EnforcedStyle: double_quotes

Style/SymbolArray:
  EnforcedStyle: brackets

Style/TrailingCommaInArguments:
  EnforcedStyleForMultiline: comma

Style/TrailingCommaInArrayLiteral:
  EnforcedStyleForMultiline: comma

Style/TrailingCommaInHashLiteral:
  EnforcedStyleForMultiline: comma

Style/WordArray:
  EnforcedStyle: brackets