zilverline/sequent

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

AllCops:
  SuggestExtensions:
    rubocop-rake: false
    rubocop-rspec: false
  Exclude:
    # default
    - '**/node_modules/**/*'
    - '**/vendor/**/*'
    - '**/.git/**/*'
    # sequent
    - '**/sequent/generator/template_aggregate/**/*'
    - '**/sequent/generator/template_project/**/*'
    - 'db/sequent_schema.rb'
    - 'docs/**/*'
    - 'integration-specs/rails-app/bin/*'
    - 'integration-specs/rails-app/config/puma.rb'
    - 'integration-specs/rails-app/db/*'
##
# General styles
##
Style/Documentation:
  Enabled: false # Code should be self-documenting

Style/AsciiComments:
  Enabled: false # We have no issues with non-ascii characters in comments

Style/StructInheritance:
  Enabled: false # We don't want this because Rubymine doesn't understand the 'correct' way.

Style/GuardClause:
  Enabled: false # Can lead to strange constructions

Style/EachWithObject:
  Enabled: false # We prefer/are used to using reduce

Style/NumericPredicate:
  Enabled: false # Using .zero? can lead to 'Undefined method x for nil'

Style/MultilineBlockChain:
  Enabled: false # Acceptable

Style/DoubleNegation:
  Enabled: false # Usable 'hack'

Style/Lambda:
  EnforcedStyle: literal

Style/SignalException:
  EnforcedStyle: semantic

Style/FormatStringToken:
  EnforcedStyle: unannotated

Layout/LineLength:
  Enabled: true
  Max: 120
  AutoCorrect: true

Gemspec/RequiredRubyVersion:
  Enabled: false

##
# Metrics (all disabled; we have our own opinion on this)
##
Metrics/AbcSize:
  Enabled: false

Metrics/BlockLength:
  Enabled: false

Metrics/BlockNesting:
  Enabled: false

Metrics/ClassLength:
  Enabled: false

Metrics/CyclomaticComplexity:
  Enabled: false

Metrics/MethodLength:
  Enabled: false

Metrics/ModuleLength:
  Enabled: false

Metrics/ParameterLists:
  Enabled: false

Metrics/PerceivedComplexity:
  Enabled: false

##
# Trailing comma's
##
Style/TrailingCommaInArguments:
  EnforcedStyleForMultiline: comma

Style/TrailingCommaInArrayLiteral:
  EnforcedStyleForMultiline: comma

Style/TrailingCommaInHashLiteral:
  EnforcedStyleForMultiline: comma

##
# Naming things
##
Naming/AccessorMethodName:
  Enabled: false # We have our own opinion on this

Naming/PredicateName:
  Enabled: false # We have our own opinion on this

Naming/VariableNumber:
  Enabled: false # We have our own opinion on this

Naming/HeredocDelimiterNaming:
  Enabled: false # We have our own opinion on this

Naming/MethodParameterName:
  AllowedNames:
    # defaults
    - io
    - id
    - to
    - by
    - 'on'
    - in
    - at
    - ip
    - db
    - e

##
# Lint
##
Lint/UriEscapeUnescape:
  Enabled: false # TODO enable

Lint/SuppressedException:
  AllowComments: true

Lint/AmbiguousBlockAssociation:
  Enabled: true
  Exclude:
    - '**/spec/**/*'

Lint/ConstantDefinitionInBlock:
  Enabled: true
  Exclude:
    - '**/spec/**/*'
    - '**/tasks/**/*rake'

Lint/RaiseException:
  Enabled: true
  Exclude:
    - '**/spec/**/*'

##
# Layout
##
Layout/ExtraSpacing:
  Enabled: true
  AllowForAlignment: false

Layout/SpaceInsideHashLiteralBraces:
  EnforcedStyle: no_space

##
# Multi-line formatting (hashes)
##
Layout/FirstHashElementLineBreak:
  Enabled: true

Layout/FirstHashElementIndentation:
  Enabled: true
  EnforcedStyle: consistent

Layout/MultilineHashBraceLayout:
  Enabled: true
  EnforcedStyle: new_line

Layout/MultilineHashKeyLineBreaks:
  Enabled: true

##
# Multi-line formatting (array)
##
Layout/FirstArrayElementLineBreak:
  Enabled: true

Layout/FirstArrayElementIndentation:
  Enabled: true
  EnforcedStyle: consistent

Layout/MultilineArrayBraceLayout:
  Enabled: true
  EnforcedStyle: new_line

Layout/MultilineArrayLineBreaks:
  Enabled: true

Layout/SpaceAfterColon:
  Enabled: false
##
# Multi-line formatting (methods/arguments)
##
Layout/FirstMethodArgumentLineBreak:
  Enabled: true

Layout/FirstArgumentIndentation:
  Enabled: true
  EnforcedStyle: consistent

Layout/FirstParameterIndentation:
  Enabled: true
  EnforcedStyle: consistent

Layout/MultilineMethodCallBraceLayout:
  Enabled: true
  EnforcedStyle: new_line

Layout/MultilineMethodArgumentLineBreaks:
  Enabled: true

Layout/MultilineMethodCallIndentation:
  Enabled: true
  EnforcedStyle: indented

Layout/BlockAlignment:
  Enabled: true
  EnforcedStyleAlignWith: start_of_block

# TODO Ruby 3.0

Style/HashTransformKeys:
  Enabled: false

Style/OptionalBooleanParameter:
  Enabled: false

Style/SlicingWithRange:
  Enabled: false

Style/CombinableLoops:
  Enabled: false

Style/CaseLikeIf:
  Enabled: false

Style/GlobalStdStream:
  Enabled: false

Layout/EmptyLineBetweenDefs:
  Enabled: false

Style/SingleArgumentDig:
  Enabled: false

Style/RedundantRegexpEscape:
  Enabled: false

Lint/BinaryOperatorWithIdenticalOperands:
  Enabled: false

Style/SoleNestedConditional:
  Enabled: false

Style/EvalWithLocation:
  Enabled: false

Layout/SpaceBeforeBrackets: # (new in 1.7)
  Enabled: false
Lint/AmbiguousAssignment: # (new in 1.7)
  Enabled: false
Lint/DeprecatedConstants: # (new in 1.8)
  Enabled: false
Lint/DuplicateBranch: # (new in 1.3)
  Enabled: false
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
  Enabled: false
Lint/EmptyBlock: # (new in 1.1)
  Enabled: false
Lint/EmptyClass: # (new in 1.3)
  Enabled: false
Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
  Enabled: false
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
  Enabled: false
Lint/NumberedParameterAssignment: # (new in 1.9)
  Enabled: false
Lint/OrAssignmentToConstant: # (new in 1.9)
  Enabled: false
Lint/RedundantDirGlobSort: # (new in 1.8)
  Enabled: false
Lint/SymbolConversion: # (new in 1.9)
  Enabled: false
Lint/ToEnumArguments: # (new in 1.1)
  Enabled: false
Lint/TripleQuotes: # (new in 1.9)
  Enabled: false
Lint/UnexpectedBlockArity: # (new in 1.5)
  Enabled: false
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
  Enabled: false
Style/ArgumentsForwarding: # (new in 1.1)
  Enabled: false
Style/CollectionCompact: # (new in 1.2)
  Enabled: false
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
  Enabled: false
Style/EndlessMethod: # (new in 1.8)
  Enabled: false
Style/HashExcept: # (new in 1.7)
  Enabled: false
Style/IfWithBooleanLiteralBranches: # (new in 1.9)
  Enabled: false
Style/NegatedIfElseCondition: # (new in 1.2)
  Enabled: false
Style/NilLambda: # (new in 1.3)
  Enabled: false
Style/RedundantArgument: # (new in 1.4)
  Enabled: false
Style/SwapValues: # (new in 1.1)
  Enabled: false
Style/StringConcatenation:
  Enabled: false
Style/HashEachMethods:
  Enabled: false
Lint/RedundantSafeNavigation:
  Enabled: false
Style/HashTransformValues:
  Enabled: false
Lint/FloatComparison:
  Enabled: false
Style/ClassVars:
  Enabled: false
Layout/LineEndStringConcatenationIndentation: # new in 1.18
  Enabled: false
Lint/AmbiguousRange: # new in 1.19
  Enabled: false
Lint/EmptyInPattern: # new in 1.16
  Enabled: false
Naming/InclusiveLanguage: # new in 1.18
  Enabled: false
Style/HashConversion: # new in 1.10
  Enabled: false
Style/InPatternThen: # new in 1.16
  Enabled: false
Style/MultilineInPatternThen: # new in 1.16
  Enabled: false
Style/QuotedSymbols: # new in 1.16
  Enabled: false
Style/RedundantSelfAssignmentBranch: # new in 1.19
  Enabled: false
Style/StringChars: # new in 1.12
  Enabled: false
# new since rubny 3.2
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
  Enabled: false
Gemspec/DevelopmentDependencies: # new in 1.44
  Enabled: false
Gemspec/RequireMFA: # new in 1.23
  Enabled: false
Layout/LineContinuationLeadingSpace: # new in 1.31
  Enabled: false
Layout/LineContinuationSpacing: # new in 1.31
  Enabled: false
Lint/AmbiguousOperatorPrecedence: # new in 1.21
  Enabled: false
Lint/ConstantOverwrittenInRescue: # new in 1.31
  Enabled: false
Lint/DuplicateMagicComment: # new in 1.37
  Enabled: false
Lint/DuplicateMatchPattern: # new in 1.50
  Enabled: false
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
  Enabled: false
Lint/MixedCaseRange: # new in 1.53
  Enabled: false
Lint/NonAtomicFileOperation: # new in 1.31
  Enabled: false
Lint/RedundantRegexpQuantifiers: # new in 1.53
  Enabled: false
Lint/RefinementImportMethods: # new in 1.27
  Enabled: false
Lint/RequireRangeParentheses: # new in 1.32
  Enabled: false
Lint/RequireRelativeSelfPath: # new in 1.22
  Enabled: false
Lint/UselessRescue: # new in 1.43
  Enabled: false
Lint/UselessRuby2Keywords: # new in 1.23
  Enabled: false
Metrics/CollectionLiteralLength: # new in 1.47
  Enabled: false
Naming/BlockForwarding: # new in 1.24
  Enabled: false
Security/CompoundHash: # new in 1.28
  Enabled: false
Security/IoMethods: # new in 1.22
  Enabled: false
Style/ArrayIntersect: # new in 1.40
  Enabled: false
Style/ComparableClamp: # new in 1.44
  Enabled: false
Style/ConcatArrayLiterals: # new in 1.41
  Enabled: false
Style/DataInheritance: # new in 1.49
  Enabled: false
Style/DirEmpty: # new in 1.48
  Enabled: false
Style/EmptyHeredoc: # new in 1.32
  Enabled: false
Style/EnvHome: # new in 1.29
  Enabled: false
Style/ExactRegexpMatch: # new in 1.51
  Enabled: false
Style/FetchEnvVar: # new in 1.28
  Enabled: false
Style/FileEmpty: # new in 1.48
  Enabled: false
Style/FileRead: # new in 1.24
  Enabled: false
Style/FileWrite: # new in 1.24
  Enabled: false
Style/MagicCommentFormat: # new in 1.35
  Enabled: false
Style/MapCompactWithConditionalBlock: # new in 1.30
  Enabled: false
Style/MapToHash: # new in 1.24
  Enabled: false
Style/MapToSet: # new in 1.42
  Enabled: false
Style/MinMaxComparison: # new in 1.42
  Enabled: false
Style/NestedFileDirname: # new in 1.26
  Enabled: false
Style/NumberedParameters: # new in 1.22
  Enabled: false
Style/NumberedParametersLimit: # new in 1.22
  Enabled: false
Style/ObjectThen: # new in 1.28
  Enabled: false
Style/OpenStructUse: # new in 1.23
  Enabled: false
Style/OperatorMethodCall: # new in 1.37
  Enabled: false
Style/RedundantArrayConstructor: # new in 1.52
  Enabled: false
Style/RedundantConstantBase: # new in 1.40
  Enabled: false
Style/RedundantCurrentDirectoryInPath: # new in 1.53
  Enabled: false
Style/RedundantDoubleSplatHashBraces: # new in 1.41
  Enabled: false
Style/RedundantEach: # new in 1.38
  Enabled: false
Style/RedundantFilterChain: # new in 1.52
  Enabled: false
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
  Enabled: false
Style/RedundantInitialize: # new in 1.27
  Enabled: false
Style/RedundantLineContinuation: # new in 1.49
  Enabled: false
Style/RedundantRegexpArgument: # new in 1.53
  Enabled: false
Style/RedundantRegexpConstructor: # new in 1.52
  Enabled: false
Style/RedundantStringEscape: # new in 1.37
  Enabled: false
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
  Enabled: false
Style/SelectByRegexp: # new in 1.22
  Enabled: false
Style/YAMLFileRead: # new in 1.53
  Enabled: false
Style/HashSyntax:
  Enabled: false
Lint/RedundantRequireStatement:
  Enabled: false
Lint/AmbiguousRegexpLiteral:
  Enabled: false
Style/SafeNavigation:
  Enabled: false