Skip to content

Commit

Permalink
Disable the RSpec/RepeatedSubjectCall cop
Browse files Browse the repository at this point in the history
The RSpec/RepeatedSubjectCall is givin false positives on, for example:

- spec/models/workflow/step/branch_package_step_spec.rb:597
- spec/models/workflow/step/branch_package_step_spec.rb:608

See rubocop/rubocop-rspec#1821 for the details.
danidoni committed Mar 4, 2024
1 parent f88118b commit 49bd6af
Showing 2 changed files with 28 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 100`
# on 2024-01-04 11:29:08 UTC using RuboCop version 1.59.0.
# on 2024-03-04 14:13:59 UTC using RuboCop version 1.61.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@@ -37,6 +37,7 @@ Lint/RescueException:

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AutoCorrect.
Lint/UselessAssignment:
Exclude:
- 'dist/obs_mirror_project'
49 changes: 26 additions & 23 deletions src/api/.rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 100`
# on 2024-01-25 16:39:31 UTC using RuboCop version 1.60.1.
# on 2024-03-04 14:16:46 UTC using RuboCop version 1.61.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@@ -158,25 +158,25 @@ Lint/StructNewOverride:
Exclude:
- 'app/models/buildresult.rb'

# Offense count: 7
# Offense count: 6
# Configuration parameters: AllowComments, AllowNil.
Lint/SuppressedException:
Exclude:
- 'app/components/sourcediff_component.rb'
- 'app/helpers/maintenance_helper.rb'
- 'app/models/package.rb'
- 'app/models/user.rb'
- 'lib/obsapi/markdown_renderer.rb'
- 'spec/models/project_spec.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AutoCorrect.
Lint/UselessMethodDefinition:
Exclude:
- 'app/controllers/webui/requests/submissions_controller.rb'
- 'test/test_helper.rb'

# Offense count: 899
# Offense count: 905
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 256
@@ -283,7 +283,7 @@ Metrics/ClassLength:
- 'test/unit/publish_flag_test.rb'
- 'test/unit/user_test.rb'

# Offense count: 189
# Offense count: 190
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
Metrics/CyclomaticComplexity:
Exclude:
@@ -375,7 +375,7 @@ Metrics/CyclomaticComplexity:
- 'test/functional/zzz_post_consistency_test.rb'
- 'test/node_matcher.rb'

# Offense count: 980
# Offense count: 985
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 221
@@ -563,7 +563,7 @@ Naming/MethodParameterName:
- 'lib/memory_debugger.rb'
- 'script/reformat_memprof'

# Offense count: 51
# Offense count: 52
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
# NamePrefix: is_, has_, have_
# ForbiddenPrefixes: is_, has_, have_
@@ -656,20 +656,20 @@ RSpec/AnyInstance:
- 'spec/models/project_spec.rb'
- 'spec/policies/package_policy_spec.rb'

# Offense count: 1290
# Offense count: 1292
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Enabled: false

# Offense count: 474
# Offense count: 538
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SkipBlocks, EnforcedStyle.
# SupportedStyles: described_class, explicit
RSpec/DescribedClass:
Enabled: false

# Offense count: 216
# Offense count: 215
# Configuration parameters: Max, CountAsOne.
RSpec/ExampleLength:
Exclude:
@@ -787,13 +787,15 @@ RSpec/MessageSpies:
- 'spec/controllers/webui/apidocs_controller_spec.rb'
- 'spec/models/kiwi/image_spec.rb'

# Offense count: 1678
# Offense count: 1679
# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Max: 28

# Offense count: 12
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: ResponseMethods.
# ResponseMethods: response, last_response
RSpec/Rails/HaveHttpStatus:
Exclude:
- 'spec/controllers/attribute_controller_spec.rb'
@@ -802,6 +804,15 @@ RSpec/Rails/HaveHttpStatus:
- 'spec/controllers/webui/session_controller_spec.rb'
- 'spec/controllers/webui/users/notifications_controller_spec.rb'

# Offense count: 10
RSpec/RepeatedSubjectCall:
Exclude:
- 'spec/models/workflow/step/branch_package_step_spec.rb'
- 'spec/models/workflow/step/configure_repositories_spec.rb'
- 'spec/models/workflow/step/link_package_step_spec.rb'
- 'spec/models/workflow/step/rebuild_package_step_spec.rb'
- 'spec/models/workflow/step/submit_request_step_spec.rb'

# Offense count: 1
RSpec/SubjectStub:
Exclude:
@@ -961,14 +972,6 @@ Rails/OutputSafety:
- 'app/helpers/webui/request_helper.rb'
- 'app/helpers/webui/user_helper.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: conservative, aggressive
Rails/PluckInWhere:
Exclude:
- 'app/models/user.rb'

# Offense count: 14
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Include.
@@ -1066,7 +1069,7 @@ Rails/TimeZone:
- 'test/unit/binary_release_test.rb'
- 'test/unit/package_remove_test.rb'

# Offense count: 162
# Offense count: 164
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: nested, compact
@@ -1109,7 +1112,7 @@ Style/ConditionalAssignment:
Exclude:
- 'app/models/bs_request_action_submit.rb'

# Offense count: 1062
# Offense count: 1066
# Configuration parameters: AllowedConstants.
Style/Documentation:
Enabled: false
@@ -1121,7 +1124,7 @@ Style/ExplicitBlockArgument:
- 'app/lib/backend/connection.rb'
- 'app/models/project.rb'

# Offense count: 1825
# Offense count: 1834
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
@@ -1268,7 +1271,7 @@ ViewComponent/MissingPreviewFile:
- 'app/components/workflow_run_row_component.rb'
- 'app/components/workflow_run_status_badge_component.rb'

# Offense count: 3312
# Offense count: 3328
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https

0 comments on commit 49bd6af

Please sign in to comment.