Skip to content

Commit

Permalink
Merge pull request #16156 from openSUSE/depfu/update/srcapi/rubocop-r…
Browse files Browse the repository at this point in the history
…ails-2.25.0

[src/api] Update rubocop-rails 2.24.1 → 2.25.0 (minor)
  • Loading branch information
saraycp committed May 20, 2024
2 parents 85d9af5 + bafa4e3 commit 7af2a9d
Show file tree
Hide file tree
Showing 29 changed files with 876 additions and 866 deletions.
46 changes: 28 additions & 18 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-05-10 11:31:30 UTC using RuboCop version 1.63.5.
# on 2024-05-20 11:40:14 UTC using RuboCop version 1.63.5.
# 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
Expand Down Expand Up @@ -61,7 +61,7 @@ FactoryBot/ExcessiveCreateList:
Exclude:
- 'spec/controllers/webui/monitor_controller_spec.rb'

# Offense count: 25
# Offense count: 26
# Configuration parameters: Include.
# Include: **/*_spec.rb, **/spec/**/*, **/test/**/*, **/features/support/factories/**/*.rb
FactoryBot/FactoryAssociationWithStrategy:
Expand All @@ -83,7 +83,7 @@ FactoryBot/FactoryAssociationWithStrategy:
- 'spec/factories/watched_items.rb'
- 'spec/factories/workflow_runs.rb'

# Offense count: 3285
# Offense count: 3295
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Expand Down Expand Up @@ -164,7 +164,7 @@ Lint/UselessMethodDefinition:
Exclude:
- 'app/controllers/webui/requests/submissions_controller.rb'

# Offense count: 905
# Offense count: 903
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 255
Expand Down Expand Up @@ -273,7 +273,7 @@ Metrics/ClassLength:
- 'test/unit/publish_flag_test.rb'
- 'test/unit/user_test.rb'

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

# Offense count: 989
# Offense count: 990
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 221
Expand Down Expand Up @@ -397,7 +397,7 @@ Metrics/ParameterLists:
- 'test/functional/read_permission_test.rb'
- 'test/functional/source_controller_test.rb'

# Offense count: 161
# Offense count: 159
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
Metrics/PerceivedComplexity:
Exclude:
Expand Down Expand Up @@ -439,7 +439,6 @@ Metrics/PerceivedComplexity:
- 'app/models/branch_package.rb'
- 'app/models/branch_package/check_for_update.rb'
- 'app/models/bs_request.rb'
- 'app/models/bs_request/find_for/query.rb'
- 'app/models/bs_request_action.rb'
- 'app/models/bs_request_action/differ/query_builder.rb'
- 'app/models/bs_request_action_maintenance_incident.rb'
Expand Down Expand Up @@ -644,7 +643,7 @@ RSpec/AnyInstance:
- 'spec/models/project_spec.rb'
- 'spec/policies/package_policy_spec.rb'

# Offense count: 1282
# Offense count: 1283
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Expand All @@ -657,7 +656,7 @@ RSpec/ContextWording:
RSpec/DescribedClass:
Enabled: false

# Offense count: 216
# Offense count: 214
# Configuration parameters: Max, CountAsOne.
RSpec/ExampleLength:
Exclude:
Expand Down Expand Up @@ -769,7 +768,7 @@ RSpec/MessageSpies:
- 'spec/controllers/webui/apidocs_controller_spec.rb'
- 'spec/models/kiwi/image_spec.rb'

# Offense count: 1652
# Offense count: 1641
# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Max: 28
Expand Down Expand Up @@ -845,7 +844,7 @@ Rails/FilePath:
- 'test/functional/zzz_post_consistency_test.rb'
- 'test/test_helper.rb'

# Offense count: 28
# Offense count: 29
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasManyOrHasOneDependent:
Expand All @@ -869,7 +868,7 @@ Rails/HelperInstanceVariable:
- 'app/helpers/webui/project_helper.rb'
- 'app/helpers/webui/webui_helper.rb'

# Offense count: 37
# Offense count: 39
# Configuration parameters: IgnoreScopes, Include.
# Include: app/models/**/*.rb
Rails/InverseOf:
Expand Down Expand Up @@ -1008,7 +1007,18 @@ Rails/TimeZone:
- 'test/unit/binary_release_test.rb'
- 'test/unit/package_remove_test.rb'

# Offense count: 163
# Offense count: 7
# This cop supports safe autocorrection (--autocorrect).
Rails/WhereRange:
Exclude:
- 'app/controllers/webui/feeds_controller.rb'
- 'app/jobs/status_history_rescaler_job.rb'
- 'app/models/bs_request.rb'
- 'app/models/notification.rb'
- 'app/models/project_log_entry.rb'
- 'db/data/20200326221616_regenerate_notifications.rb'

# Offense count: 165
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: nested, compact
Expand Down Expand Up @@ -1043,7 +1053,7 @@ Style/ConditionalAssignment:
Exclude:
- 'app/models/bs_request_action_submit.rb'

# Offense count: 1069
# Offense count: 1086
# Configuration parameters: AllowedConstants.
Style/Documentation:
Enabled: false
Expand All @@ -1055,7 +1065,7 @@ Style/ExplicitBlockArgument:
- 'app/lib/backend/connection.rb'
- 'app/models/project.rb'

# Offense count: 1844
# Offense count: 1872
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
Expand All @@ -1068,7 +1078,7 @@ Style/HashExcept:
Exclude:
- 'spec/models/user_ldap_strategy_spec.rb'

# Offense count: 305
# Offense count: 308
# This cop supports safe autocorrection (--autocorrect).
Style/IfUnlessModifier:
Enabled: false
Expand Down Expand Up @@ -1197,7 +1207,7 @@ ViewComponent/AvoidGlobalState:
- 'app/components/notification_filter_component.rb'
- 'app/components/user_avatar_component.rb'

# Offense count: 25
# Offense count: 22
ViewComponent/MissingPreviewFile:
Exclude:
- 'app/components/action_seen_by_user_component.rb'
Expand Down
2 changes: 1 addition & 1 deletion src/api/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ GEM
rubocop-performance (1.21.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.24.1)
rubocop-rails (2.25.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
Expand Down
2 changes: 1 addition & 1 deletion src/api/test/functional/about_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_about_anonymous
def test_application_controller
prepare_request_valid_user
get '/about?user[asd]=yxc'
assert_response 400
assert_response :bad_request
assert_xml_tag(tag: 'status', attributes: { code: 'invalid_parameter' })
end
end
4 changes: 2 additions & 2 deletions src/api/test/functional/architectures_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def setup
def test_index
# Get all issue trackers
get '/architectures'
assert_response 401
assert_response :unauthorized

prepare_request_valid_user
get '/architectures'
Expand All @@ -27,7 +27,7 @@ def test_show
assert_xml_tag tag: 'architecture', attributes: { name: 'i586' }

get '/architectures/futurearch'
assert_response 400
assert_response :bad_request
assert_xml_tag tag: 'status', attributes: { code: 'unknown_architecture' }
end
end

0 comments on commit 7af2a9d

Please sign in to comment.