.rubocop.yml in cocina-models-0.75.0 vs .rubocop.yml in cocina-models-0.76.0
- old
+ new
@@ -9,19 +9,17 @@
# dor-services-app is stuck at ruby 2 until we get off Fedora3
TargetRubyVersion: 2.7
# ----- Layout ------
-Layout/LineLength:
- Max: 114
- Exclude:
- - lib/cocina/models/*
-
Layout/BeginEndAlignment: # (new in 0.91)
Enabled: true
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
+Layout/LineLength:
+ Exclude:
+ - lib/cocina/models/*
Layout/SpaceAroundMethodCallOperator:
Enabled: true
# ----- Lint ------
@@ -77,32 +75,49 @@
Metrics/BlockLength:
Exclude:
- cocina-models.gemspec
- spec/cocina/**/*
- lib/cocina/rspec/matchers.rb
+ - 'spec/support/mods_mapping_spec_helper.rb'
+# Offense count: 16
+# Configuration parameters: CountComments, CountAsOne.
+Metrics/ClassLength:
+ Max: 100
+ Exclude:
+ - 'lib/cocina/rspec/factories.rb'
+
Metrics/MethodLength:
Max: 14
Exclude:
- 'spec/cocina/models/file_access_spec.rb'
- 'spec/cocina/models/dro_access_spec.rb'
+ - 'lib/cocina/rspec/factories.rb'
+ - 'lib/cocina/models/mapping/to_mods/*'
+ - 'lib/cocina/models/mapping/from_mods/*'
+ - 'lib/cocina/models/mapping/normalizers/mods/origin_info_normalizer.rb'
+ - 'lib/cocina/models/mapping/normalizers/mods/subject_normalizer.rb'
+ - 'lib/cocina/models/mapping/normalizers/mods_normalizer.rb'
+
+# Offense count: 37
+# Configuration parameters: IgnoredMethods.
+Metrics/PerceivedComplexity:
+ # Max: 20
+ Exclude:
+ - 'lib/cocina/models/mapping/from_mods/*'
+ - 'lib/cocina/models/mapping/to_mods/*'
+ - 'lib/cocina/models/mapping/normalizers/**/*'
+
# ----- RSpec ------
RSpec/BeEq: # new in 2.9.0
Enabled: true
RSpec/BeNil: # new in 2.9.0
Enabled: true
-RSpec/ExampleLength:
- Max: 18
- Exclude:
- - spec/cocina/models/description_spec.rb
- - spec/cocina/models/dro_shared_examples.rb
- - spec/cocina/models/builders/name_title_group_builder_spec.rb
-
RSpec/MultipleExpectations:
Enabled: false
RSpec/StubbedMock: # (new in 1.44)
Enabled: true
@@ -280,6 +295,19 @@
RSpec/FactoryBot/SyntaxMethods: # new in 2.7
Enabled: true
RSpec/Rails/AvoidSetupHook: # new in 2.4
Enabled: true
Style/NestedFileDirname: # new in 1.26
+ Enabled: true
+
+Lint/RefinementImportMethods: # new in 1.27
+ Enabled: true
+Security/CompoundHash: # new in 1.28
+ Enabled: true
+Style/FetchEnvVar: # new in 1.28
+ Enabled: true
+Style/ObjectThen: # new in 1.28
+ Enabled: true
+Style/RedundantInitialize: # new in 1.27
+ Enabled: true
+RSpec/VerifiedDoubleReference: # new in 2.10.0
Enabled: true