# This is the configuration used to check the rubocop source code. inherit_from: .rubocop_todo.yml require: - rubocop-rspec AllCops: TargetRubyVersion: 2.5 # ----- Layout ------ Layout/LineLength: Max: 114 Exclude: - lib/cocina/models/* Layout/BeginEndAlignment: # (new in 0.91) Enabled: true Layout/EmptyLinesAroundAttributeAccessor: Enabled: true Layout/SpaceAroundMethodCallOperator: Enabled: true # ----- Lint ------ Lint/BinaryOperatorWithIdenticalOperands: Enabled: true Lint/ConstantDefinitionInBlock: # (new in 0.91) Enabled: true Lint/DeprecatedOpenSSLConstant: Enabled: true Lint/DuplicateElsifCondition: Enabled: true Lint/DuplicateRequire: # (new in 0.90) Enabled: true Lint/DuplicateRescueException: Enabled: true Lint/EmptyConditionalBody: Enabled: true Lint/EmptyFile: # (new in 0.90) Enabled: true Lint/FloatComparison: Enabled: true Lint/HashCompareByIdentity: # (new in 0.93) Enabled: true Lint/IdentityComparison: # (new in 0.91) Enabled: true Lint/MissingSuper: Enabled: true Lint/MixedRegexpCaptureTypes: Enabled: true Lint/OutOfRangeRegexpRef: Enabled: true Lint/RaiseException: Enabled: true Lint/RedundantSafeNavigation: # (new in 0.93) Enabled: true Lint/SelfAssignment: Enabled: true Lint/StructNewOverride: Enabled: true Lint/TopLevelReturnWithArgument: Enabled: true Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90) Enabled: true Lint/UnreachableLoop: Enabled: true Lint/UselessMethodDefinition: # (new in 0.90) Enabled: true Lint/UselessTimes: # (new in 0.91) Enabled: true # ----- Metrics ------ Metrics/BlockLength: Exclude: - cocina-models.gemspec - spec/cocina/**/* Metrics/MethodLength: Max: 14 # ----- RSpec ------ RSpec/ExampleLength: Max: 18 Exclude: - spec/cocina/models/description_spec.rb - spec/cocina/models/dro_shared_examples.rb RSpec/MultipleExpectations: Enabled: false RSpec/StubbedMock: # (new in 1.44) Enabled: true # ----- Style ------ Style/Documentation: Exclude: - lib/cocina/models/* Style/AccessorGrouping: Enabled: true Style/ArrayCoercion: Enabled: true Style/BisectedAttrAccessor: Enabled: true Style/CaseLikeIf: Enabled: true Style/ClassEqualityComparison: # (new in 0.93) Enabled: true Style/CombinableLoops: # (new in 0.90) Enabled: true Style/ExplicitBlockArgument: Enabled: true Style/ExponentialNotation: Enabled: true Style/GlobalStdStream: Enabled: true Style/HashAsLastArrayItem: Enabled: true Style/HashEachMethods: Enabled: true Style/HashLikeCase: Enabled: true Style/HashTransformKeys: Enabled: true Style/HashTransformValues: Enabled: true Style/KeywordParametersOrder: # (new in 0.90) Enabled: true Style/OptionalBooleanParameter: Enabled: false Style/RedundantAssignment: Enabled: true Style/RedundantFetchBlock: Enabled: true Style/RedundantFileExtensionInRequire: Enabled: true Style/RedundantRegexpCharacterClass: Enabled: true Style/RedundantRegexpEscape: Enabled: true Style/RedundantSelfAssignment: # (new in 0.90) Enabled: true Style/SingleArgumentDig: Enabled: true Style/SlicingWithRange: Enabled: true Style/SoleNestedConditional: # (new in 0.89) Enabled: true Style/StringConcatenation: Enabled: true