erikw/jekyll-glossary_tooltip

View on GitHub
.rubocop.yml

Summary

Maintainability
Test Coverage
# See pages relaed at https://docs.rubocop.org/rubocop/1.12/cops_layout.html

# Rubocop extensions
require:
  - rubocop-rake
  - rubocop-rspec

inherit_mode:
  merge:
    - Exclude  # Merge my AllCops.Excllude with default exludes from https://github.com/rubocop/rubocop/blob/master/config/default.yml

AllCops:
  TargetRubyVersion: 3.0
  Include:
  - lib/**/*.rb
  - spec/**/*.rb
  Exclude:
  # Travis: during build there will be a lot of rubocop config files in this pat which will cause build failure as the refer to gems which are not installed by this project.
  # See https://github.com/rubocop/rubocop/issues/9832
  - gemfiles/vendor/bundle/**/*
  NewCops: enable

Gemspec/DeprecatedAttributeAssignment:
  Enabled: true
Gemspec/RequireMFA:
  Enabled: true

Layout/LineEndStringConcatenationIndentation:
  Enabled: true
Layout/EmptyLineBetweenDefs:
  Enabled: true
  Exclude:
  - lib/jekyll-glossary_tooltip/errors.rb
Layout/SpaceBeforeBrackets:
  Enabled: true

Lint/AmbiguousAssignment:
  Enabled: true
Lint/DeprecatedConstants:
  Enabled: true
Lint/DuplicateBranch:
  Enabled: true
Lint/DuplicateRegexpCharacterClassElement:
  Enabled: true
Lint/EmptyBlock:
  Enabled: true
Lint/EmptyClass:
  Enabled: true
Lint/AmbiguousOperatorPrecedence:
  Enabled: true
Lint/AmbiguousRange:
  Enabled: true
Lint/IncompatibleIoSelectWithFiberScheduler:
  Enabled: true
Lint/RequireRelativeSelfPath:
  Enabled: true
Lint/UselessRuby2Keywords:
  Enabled: true
Lint/EmptyInPattern:
  Enabled: true
Lint/LambdaWithoutLiteralBlock:
  Enabled: true
Layout/LineLength:
  Max: 120
Lint/NoReturnInBeginEndBlocks:
  Enabled: true
Lint/NumberedParameterAssignment:
  Enabled: true
Lint/OrAssignmentToConstant:
  Enabled: true
Lint/RedundantDirGlobSort:
  Enabled: true
Lint/SymbolConversion:
  Enabled: true
Lint/ToEnumArguments:
  Enabled: true
Lint/TripleQuotes:
  Enabled: true
Lint/UnexpectedBlockArity:
  Enabled: true
Lint/UnmodifiedReduceAccumulator:
  Enabled: true
Lint/UnreachableCode:
  Severity: error
Lint/UselessAccessModifier:
  Enabled: false

Metrics/AbcSize:
  Enabled: true
Metrics/BlockLength:
  Enabled: true
  Max: 100
Metrics/MethodLength:
  Enabled: true
  Max: 25

Naming/FileName:
  Enabled: false
  Exclude:
  - lib/jekyll-glossary_tooltip.rb
Naming/InclusiveLanguage:
  Enabled: true
Naming/BlockForwarding:
  Enabled: true

Security/IoMethods:
  Enabled: true

Style/ArgumentsForwarding:
  Enabled: true
Style/CollectionCompact:
  Enabled: true
Style/Documentation:
  Enabled: true
  Exclude:
  - lib/jekyll-glossary_tooltip/errors.rb
Style/DocumentDynamicEvalDefinition:
  Enabled: true
Style/EndlessMethod:
  Enabled: true
Style/HashConversion:
  Enabled: true
Style/HashExcept:
  Enabled: true
Style/IfWithBooleanLiteralBranches:
  Enabled: true
Style/InPatternThen:
  Enabled: true
Style/MultilineInPatternThen:
  Enabled: true
Style/NegatedIfElseCondition:
  Enabled: true
Style/NilLambda:
  Enabled: true
Style/QuotedSymbols:
  Enabled: true
Style/RedundantArgument:
  Enabled: true
Style/RegexpLiteral:
  Enabled: false
Style/SingleLineMethods:
  Enabled: true
  Exclude:
  - lib/jekyll-glossary_tooltip/errors.rb
Style/StringChars:
  Enabled: true
Style/StringLiterals:
  Enabled: true
  EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
  Enabled: true
  EnforcedStyle: double_quotes
Style/SwapValues:
  Enabled: true
Style/FileRead:
  Enabled: true
Style/FileWrite:
  Enabled: true
Style/MapToHash:
  Enabled: true
Style/NumberedParameters:
  Enabled: true
Style/NumberedParametersLimit:
  Enabled: true
Style/OpenStructUse:
  Enabled: true
Style/RedundantSelfAssignmentBranch:
  Enabled: true
Style/SelectByRegexp:
  Enabled: true


# Reference: https://github.com/rubocop/rubocop-rake/blob/master/config/default.yml
Rake:
  Enabled: true

# Reference:
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html
# https://github.com/rubocop/rubocop-rspec/blob/master/config/default.yml
RSpec:
  Enabled: true
RSpec/FilePath:
 # Disable to match structure of lib/. For jekyll plugin inclusion convention features, not having lib/jekyll/sth.rb but lib/jekyll-sth.rb
  Enabled: false
RSpec/IdenticalEqualityAssertion:
  Enabled: true
RSpec/Rails/AvoidSetupHook:
  Enabled: false
RSpec/BeforeAfterAll:
  Enabled: false
RSpec/ExcessiveDocstringSpacing:
  Enabled: true
RSpec/SubjectDeclaration:
  Enabled: true
RSpec/FactoryBot/SyntaxMethods:
  Enabled: true
RSpec/MultipleMemoizedHelpers:
  Enabled: true
  Max: 10