From a4cdaf8f52d2aeb911b1852cc7e774cc06c6cc29 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Wed, 16 Mar 2022 11:35:37 +0100 Subject: [PATCH] Regenerate rubocop todos --- .rubocop_todo.yml | 16 +++++- src/api/.rubocop.yml | 2 + src/api/.rubocop_todo.yml | 116 ++++++++++++++++++++++++++------------ 3 files changed, 97 insertions(+), 37 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d33ea019d4f0..a5df2b9f083d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 100` -# on 2022-02-22 15:10:37 UTC using RuboCop version 1.25.1. +# on 2022-03-16 10:35:15 UTC using RuboCop version 1.25.1. # 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 @@ -93,6 +93,14 @@ Style/GlobalStdStream: Exclude: - 'dist/clouduploader.rb' +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. +# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys +# SupportedShorthandSyntax: always, never, either +Style/HashSyntax: + EnforcedStyle: ruby19 + # Offense count: 1 Style/MixinUsage: Exclude: @@ -115,6 +123,12 @@ Style/RedundantBegin: Exclude: - 'Rakefile' +# Offense count: 1 +# Cop supports --auto-correct-all. +Style/SlicingWithRange: + Exclude: + - 'dist/obs_mirror_project' + # Offense count: 38 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. diff --git a/src/api/.rubocop.yml b/src/api/.rubocop.yml index 636d3470163d..532ce1e796c8 100644 --- a/src/api/.rubocop.yml +++ b/src/api/.rubocop.yml @@ -209,6 +209,8 @@ Style/HashTransformKeys: Enabled: false Style/HashTransformValues: Enabled: false +Style/HashSyntax: + EnforcedShorthandSyntax: either # We agreed on disabling this cop since it's often a sign of a code smell when we need to use `something&.my_method` Style/SafeNavigation: diff --git a/src/api/.rubocop_todo.yml b/src/api/.rubocop_todo.yml index e03eef4b1a28..1e0bf7d95ce7 100644 --- a/src/api/.rubocop_todo.yml +++ b/src/api/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 100` -# on 2022-02-22 15:13:45 UTC using RuboCop version 1.25.1. +# on 2022-03-16 10:31:20 UTC using RuboCop version 1.25.1. # 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 @@ -63,6 +63,13 @@ Lint/RedundantCopDisableDirective: - 'app/models/issue_tracker.rb' - 'spec/jobs/consistency_check_job_spec.rb' +# Offense count: 3 +# Cop supports --auto-correct. +Lint/RedundantDirGlobSort: + Exclude: + - 'spec/browser_helper.rb' + - 'spec/spec_helper.rb' + # Offense count: 5 Lint/RescueException: Exclude: @@ -99,24 +106,6 @@ Lint/UnreachableLoop: Exclude: - 'app/lib/suse/validator.rb' -# Offense count: 34 -Lint/UriEscapeUnescape: - Exclude: - - 'app/controllers/group_controller.rb' - - 'app/controllers/person_controller.rb' - - 'app/helpers/maintenance_helper.rb' - - 'app/helpers/webui/webui_helper.rb' - - 'app/models/package.rb' - - 'app/models/package_file.rb' - - 'app/models/project.rb' - - 'app/models/project_config_file.rb' - - 'app/models/project_file.rb' - - 'app/models/project_meta_file.rb' - - 'spec/factories/packages.rb' - - 'spec/models/backend/file_spec.rb' - - 'spec/models/package_spec.rb' - - 'test/functional/request_controller_test.rb' - # Offense count: 5 # Cop supports --auto-correct-all. # Configuration parameters: AllowComments. @@ -128,7 +117,7 @@ Lint/UselessMethodDefinition: - 'app/services/consistency_check_job_service/project_consistency_checker.rb' - 'test/test_helper.rb' -# Offense count: 832 +# Offense count: 834 # Configuration parameters: IgnoredMethods, CountRepeatedAttributes. Metrics/AbcSize: Max: 241 @@ -233,7 +222,7 @@ Metrics/ClassLength: - 'test/unit/publish_flag_test.rb' - 'test/unit/user_test.rb' -# Offense count: 192 +# Offense count: 193 # Configuration parameters: IgnoredMethods, Max. Metrics/CyclomaticComplexity: Exclude: @@ -324,7 +313,7 @@ Metrics/CyclomaticComplexity: - 'test/functional/zzz_post_consistency_test.rb' - 'test/node_matcher.rb' -# Offense count: 927 +# Offense count: 930 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. Metrics/MethodLength: Max: 221 @@ -353,7 +342,7 @@ Metrics/ParameterLists: - 'test/functional/read_permission_test.rb' - 'test/functional/source_controller_test.rb' -# Offense count: 167 +# Offense count: 166 # Configuration parameters: IgnoredMethods, Max. Metrics/PerceivedComplexity: Exclude: @@ -454,6 +443,16 @@ Naming/AccessorMethodName: - 'app/models/user.rb' - 'test/functional/search_controller_test.rb' +# Offense count: 8 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, BlockForwardingName. +# SupportedStyles: anonymous, explicit +Naming/BlockForwarding: + Exclude: + - 'app/lib/suse/permission.rb' + - 'app/models/configuration.rb' + - 'db/data/20170831143534_convert_notifications_event_payload_to_json.rb' + # Offense count: 19 # Configuration parameters: ForbiddenDelimiters. # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$)) @@ -599,6 +598,17 @@ Performance/Detect: - 'app/controllers/public_controller.rb' - 'app/controllers/webui/kiwi/images_controller.rb' +# Offense count: 7 +# Cop supports --auto-correct. +Performance/MapCompact: + Exclude: + - 'app/controllers/trigger_workflow_controller.rb' + - 'app/helpers/webui/package_helper.rb' + - 'app/models/event/request.rb' + - 'app/models/package.rb' + - 'app/services/staging/staging_project_creator.rb' + - 'app/services/user_service/involved.rb' + # Offense count: 38 # Cop supports --auto-correct. Performance/RegexpMatch: @@ -653,20 +663,20 @@ RSpec/AnyInstance: - 'spec/models/project_spec.rb' - 'spec/policies/package_policy_spec.rb' -# Offense count: 1059 +# Offense count: 1078 # Configuration parameters: Prefixes. # Prefixes: when, with, without RSpec/ContextWording: Enabled: false -# Offense count: 439 +# Offense count: 438 # Cop supports --auto-correct. # Configuration parameters: SkipBlocks, EnforcedStyle. # SupportedStyles: described_class, explicit RSpec/DescribedClass: Enabled: false -# Offense count: 213 +# Offense count: 212 # Configuration parameters: Max, CountAsOne. RSpec/ExampleLength: Exclude: @@ -713,7 +723,6 @@ RSpec/ExampleLength: - 'spec/features/webui/watchlists_spec.rb' - 'spec/helpers/webui/markdown_helper_spec.rb' - 'spec/helpers/webui/webui_helper_spec.rb' - - 'spec/lib/backend/api/cloud_spec.rb' - 'spec/mailers/event_mailer_spec.rb' - 'spec/models/bs_request_spec.rb' - 'spec/models/kiwi/image_spec.rb' @@ -753,7 +762,7 @@ RSpec/IteratedExpectation: Exclude: - 'spec/models/user_spec.rb' -# Offense count: 340 +# Offense count: 348 # Cop supports --auto-correct. RSpec/LeadingSubject: Enabled: false @@ -766,7 +775,7 @@ RSpec/MessageSpies: - 'spec/controllers/webui/apidocs_controller_spec.rb' - 'spec/models/kiwi/image_spec.rb' -# Offense count: 1497 +# Offense count: 1510 # Configuration parameters: AllowSubject. RSpec/MultipleMemoizedHelpers: Max: 27 @@ -1027,7 +1036,7 @@ Rails/TimeZone: - 'test/unit/binary_release.rb' - 'test/unit/package_remove_test.rb' -# Offense count: 136 +# Offense count: 137 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: nested, compact @@ -1069,7 +1078,7 @@ Style/ConditionalAssignment: Exclude: - 'app/models/bs_request_action_submit.rb' -# Offense count: 756 +# Offense count: 766 # Configuration parameters: AllowedConstants. Style/Documentation: Enabled: false @@ -1081,13 +1090,19 @@ Style/ExplicitBlockArgument: - 'app/lib/backend/connection.rb' - 'app/models/project.rb' -# Offense count: 1562 +# Offense count: 1578 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: always, always_true, never Style/FrozenStringLiteralComment: Enabled: false +# Offense count: 1 +# Cop supports --auto-correct. +Style/HashExcept: + Exclude: + - 'spec/models/user_ldap_strategy_spec.rb' + # Offense count: 6 # Cop supports --auto-correct. Style/IdenticalConditionalBranches: @@ -1095,6 +1110,14 @@ Style/IdenticalConditionalBranches: - 'app/controllers/build_controller.rb' - 'app/controllers/webui/search_controller.rb' +# Offense count: 5 +# Cop supports --auto-correct-all. +Style/MapToHash: + Exclude: + - 'app/models/worker_status.rb' + - 'app/services/monitor_controller_service/building_information_updater.rb' + - 'test/node_matcher.rb' + # Offense count: 2 Style/MissingRespondToMissing: Exclude: @@ -1138,6 +1161,27 @@ Style/OptionalBooleanParameter: - 'app/policies/package_policy.rb' - 'lib/xpath_engine.rb' +# Offense count: 2 +# Cop supports --auto-correct. +Style/RedundantFreeze: + Exclude: + - 'lib/pretty_nested_errors/key_and_messages_parser.rb' + +# Offense count: 11 +# Cop supports --auto-correct-all. +Style/SlicingWithRange: + Exclude: + - 'app/controllers/build_controller.rb' + - 'app/controllers/webui/search_controller.rb' + - 'app/helpers/webui/package_helper.rb' + - 'app/helpers/webui/projects/status_helper.rb' + - 'app/helpers/webui/staging/workflow_helper.rb' + - 'app/helpers/webui/webui_helper.rb' + - 'app/models/issue_tracker.rb' + - 'app/models/kiwi/image.rb' + - 'app/services/package_service/schema_verifier.rb' + - 'test/node_matcher.rb' + # Offense count: 55 # Cop supports --auto-correct. # Configuration parameters: AllowModifier. @@ -1170,27 +1214,27 @@ Style/SoleNestedConditional: - 'script/reformat_memprof' - 'test/node_matcher.rb' -# Offense count: 300 +# Offense count: 298 # Cop supports --auto-correct-all. # Configuration parameters: Mode. Style/StringConcatenation: Enabled: false -# Offense count: 350 +# Offense count: 353 # Cop supports --auto-correct. # Configuration parameters: MinSize. # SupportedStyles: percent, brackets Style/SymbolArray: EnforcedStyle: brackets -# Offense count: 280 +# Offense count: 281 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, MinSize, WordRegex. # SupportedStyles: percent, brackets Style/WordArray: Enabled: false -# Offense count: 2101 +# Offense count: 2115 # Cop supports --auto-correct. # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https