From: Go MAEDA Date: Fri, 10 Dec 2021 05:46:19 +0000 (+0000) Subject: Update RuboCop to 1.23 (#35136). X-Git-Tag: 5.0.0~164 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7b63f0645b5fa3114c1a888419f5f1706693fe56;p=redmine.git Update RuboCop to 1.23 (#35136). git-svn-id: http://svn.redmine.org/redmine/trunk@21302 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index df574a3e3..c7ae2ac1f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 20 --no-offense-counts --no-auto-gen-timestamp` -# using RuboCop version 1.17.0. +# using RuboCop version 1.23.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 @@ -12,6 +12,11 @@ Layout/ArgumentAlignment: Enabled: false +# Cop supports --auto-correct. +Layout/ClosingParenthesisIndentation: + Exclude: + - 'app/helpers/journals_helper.rb' + # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: leading, trailing @@ -149,6 +154,18 @@ Layout/IndentationWidth: - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' - 'test/mocks/open_id_authentication_mock.rb' +# Cop supports --auto-correct. +# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment. +Layout/LeadingCommentSpace: + Exclude: + - 'lib/redmine/scm/adapters/cvs_adapter.rb' + +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: aligned, indented +Layout/LineEndStringConcatenationIndentation: + Enabled: false + # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: symmetrical, new_line, same_line @@ -231,7 +248,7 @@ Layout/SpaceInsideArrayLiteralBrackets: # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. -# SupportedStyles: space, no_space +# SupportedStyles: space, compact, no_space Layout/SpaceInsideParens: Exclude: - 'app/helpers/issues_helper.rb' @@ -267,6 +284,10 @@ Lint/AmbiguousOperator: - 'test/unit/custom_field_test.rb' - 'test/unit/member_test.rb' +# Cop supports --auto-correct. +Lint/AmbiguousOperatorPrecedence: + Enabled: false + # Cop supports --auto-correct. Lint/AmbiguousRegexpLiteral: Enabled: false @@ -419,7 +440,8 @@ Naming/ConstantName: - 'app/models/time_entry_activity.rb' - 'lib/redmine/helpers/gantt.rb' -# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms. +# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms. +# CheckDefinitionPathHierarchyRoots: lib, spec, test, src # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS Naming/FileName: Exclude: @@ -1009,6 +1031,14 @@ Security/Eval: - 'app/models/user.rb' - 'config/initializers/00-core_plugins.rb' +# Cop supports --auto-correct. +Security/IoMethods: + Exclude: + - 'Gemfile' + - 'app/models/attachment.rb' + - 'test/functional/mail_handler_controller_test.rb' + - 'test/unit/mail_handler_test.rb' + Security/Open: Exclude: - 'app/models/version.rb' @@ -1405,6 +1435,7 @@ Style/MultilineTernaryOperator: - 'lib/redmine/scm/adapters/filesystem_adapter.rb' # Cop supports --auto-correct. +# Configuration parameters: AllowMethodComparison. Style/MultipleComparison: Exclude: - 'app/helpers/application_helper.rb' @@ -1652,6 +1683,11 @@ Style/RedundantSelfAssignment: Exclude: - 'lib/redmine/menu_manager.rb' +# Cop supports --auto-correct. +Style/RedundantSelfAssignmentBranch: + Exclude: + - 'lib/redmine/scm/adapters/cvs_adapter.rb' + # Cop supports --auto-correct. Style/RedundantSort: Exclude: @@ -1692,6 +1728,12 @@ Style/RescueStandardError: Style/SafeNavigation: Enabled: false +# Cop supports --auto-correct. +Style/SelectByRegexp: + Exclude: + - 'app/models/user.rb' + - 'test/application_system_test_case.rb' + # Cop supports --auto-correct. Style/SelfAssignment: Exclude: @@ -1752,7 +1794,7 @@ Style/SoleNestedConditional: - 'app/validators/date_validator.rb' # Cop supports --auto-correct. -# Configuration parameters: . +# Configuration parameters: RequireEnglish. # SupportedStyles: use_perl_names, use_english_names Style/SpecialGlobalVars: EnforcedStyle: use_perl_names @@ -1769,6 +1811,7 @@ Style/StringChars: - 'app/models/user.rb' # Cop supports --auto-correct. +# Configuration parameters: Mode. Style/StringConcatenation: Enabled: false @@ -1863,7 +1906,7 @@ Style/ZeroLengthPredicate: - 'test/unit/custom_field_test.rb' # Cop supports --auto-correct. -# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. +# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https Layout/LineLength: Max: 194 diff --git a/Gemfile b/Gemfile index 81f8e9c61..5c9e4a108 100644 --- a/Gemfile +++ b/Gemfile @@ -104,7 +104,7 @@ group :test do gem "selenium-webdriver", "~> 3.142.7" gem 'webdrivers', '4.6.1', require: false # RuboCop - gem 'rubocop', '~> 1.17.0' + gem 'rubocop', '~> 1.23.0' gem 'rubocop-performance', '~> 1.11.0' gem 'rubocop-rails', '~> 2.11.0' end