mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Update RuboCop to 1.5.2 (#32530).
Note: RubooCop 1.5.0 and 1.5.1 cannot be used for Redmine. This is because those versions of RuboCop requires regexp_parser >= 2.0 while Capybara requires regexp_parser ~> 1.5. git-svn-id: http://svn.redmine.org/redmine/trunk@20579 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
64f68a8d84
commit
e13e6fb5d3
@ -99,6 +99,10 @@ Metrics:
|
|||||||
Naming/AccessorMethodName:
|
Naming/AccessorMethodName:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
Naming/VariableNumber:
|
||||||
|
CheckMethodNames: false
|
||||||
|
CheckSymbols: false
|
||||||
|
|
||||||
Naming/BinaryOperatorParameterName:
|
Naming/BinaryOperatorParameterName:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
@ -162,6 +166,9 @@ Style/IdenticalConditionalBranches:
|
|||||||
- 'config/initializers/10-patches.rb'
|
- 'config/initializers/10-patches.rb'
|
||||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
||||||
|
|
||||||
|
Style/NegatedIfElseCondition:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
Style/RaiseArgs:
|
Style/RaiseArgs:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# This configuration was generated by
|
# This configuration was generated by
|
||||||
# `rubocop --auto-gen-config --exclude-limit 20 --no-offense-counts --no-auto-gen-timestamp`
|
# `rubocop --auto-gen-config --exclude-limit 20 --no-offense-counts --no-auto-gen-timestamp`
|
||||||
# using RuboCop version 1.0.0.
|
# using RuboCop version 1.5.2.
|
||||||
# The point is for the user to remove these configuration records
|
# The point is for the user to remove these configuration records
|
||||||
# one by one as the offenses are removed from the code base.
|
# one by one as the offenses are removed from the code base.
|
||||||
# Note that changes in the inspected code, or installation of new
|
# Note that changes in the inspected code, or installation of new
|
||||||
@ -23,6 +23,12 @@ Layout/EmptyLineAfterGuardClause:
|
|||||||
- 'lib/redmine/safe_attributes.rb'
|
- 'lib/redmine/safe_attributes.rb'
|
||||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
||||||
|
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
||||||
|
Layout/EmptyLineBetweenDefs:
|
||||||
|
Exclude:
|
||||||
|
- 'config/initializers/10-patches.rb'
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Layout/EmptyLines:
|
Layout/EmptyLines:
|
||||||
Exclude:
|
Exclude:
|
||||||
@ -298,6 +304,22 @@ Lint/DeprecatedClassMethods:
|
|||||||
- 'test/unit/attachment_test.rb'
|
- 'test/unit/attachment_test.rb'
|
||||||
- 'test/unit/issue_import_test.rb'
|
- 'test/unit/issue_import_test.rb'
|
||||||
|
|
||||||
|
Lint/DuplicateBranch:
|
||||||
|
Exclude:
|
||||||
|
- 'app/helpers/queries_helper.rb'
|
||||||
|
- 'app/models/issue.rb'
|
||||||
|
- 'lib/redmine/sudo_mode.rb'
|
||||||
|
|
||||||
|
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
||||||
|
Lint/EmptyBlock:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/issues_controller.rb'
|
||||||
|
- 'app/models/auth_source_ldap.rb'
|
||||||
|
- 'lib/redmine/scm/adapters/abstract_adapter.rb'
|
||||||
|
- 'test/helpers/application_helper_test.rb'
|
||||||
|
- 'test/unit/lib/redmine/menu_manager/menu_item_test.rb'
|
||||||
|
- 'test/unit/lib/redmine/plugin_test.rb'
|
||||||
|
|
||||||
Lint/FloatComparison:
|
Lint/FloatComparison:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/models/time_entry.rb'
|
- 'app/models/time_entry.rb'
|
||||||
@ -334,6 +356,10 @@ Lint/NonDeterministicRequireOrder:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/redmine/core_ext.rb'
|
- 'lib/redmine/core_ext.rb'
|
||||||
|
|
||||||
|
Lint/OutOfRangeRegexpRef:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Lint/ParenthesesAsGroupedExpression:
|
Lint/ParenthesesAsGroupedExpression:
|
||||||
Exclude:
|
Exclude:
|
||||||
@ -455,8 +481,9 @@ Naming/VariableName:
|
|||||||
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
|
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
|
||||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
||||||
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
|
||||||
# SupportedStyles: snake_case, normalcase, non_integer
|
# SupportedStyles: snake_case, normalcase, non_integer
|
||||||
|
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
|
||||||
Naming/VariableNumber:
|
Naming/VariableNumber:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'test/functional/versions_controller_test.rb'
|
- 'test/functional/versions_controller_test.rb'
|
||||||
@ -630,7 +657,6 @@ Rails/DynamicFindBy:
|
|||||||
# Include: app/**/*.rb, config/**/*.rb, lib/**/*.rb
|
# Include: app/**/*.rb, config/**/*.rb, lib/**/*.rb
|
||||||
Rails/Exit:
|
Rails/Exit:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/**/*.rake'
|
|
||||||
- 'config/environment.rb'
|
- 'config/environment.rb'
|
||||||
- 'config/initializers/10-patches.rb'
|
- 'config/initializers/10-patches.rb'
|
||||||
- 'config/routes.rb'
|
- 'config/routes.rb'
|
||||||
@ -1068,6 +1094,13 @@ Style/ClassVars:
|
|||||||
- 'lib/redmine/wiki_formatting/markdown/formatter.rb'
|
- 'lib/redmine/wiki_formatting/markdown/formatter.rb'
|
||||||
- 'test/helpers/activities_helper_test.rb'
|
- 'test/helpers/activities_helper_test.rb'
|
||||||
|
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/CollectionCompact:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/issues_controller.rb'
|
||||||
|
- 'app/controllers/projects_controller.rb'
|
||||||
|
- 'lib/redmine/sudo_mode.rb'
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/ColonMethodCall:
|
Style/ColonMethodCall:
|
||||||
Exclude:
|
Exclude:
|
||||||
@ -1092,9 +1125,14 @@ Style/CombinableLoops:
|
|||||||
Style/ConditionalAssignment:
|
Style/ConditionalAssignment:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
Style/DocumentDynamicEvalDefinition:
|
||||||
|
Exclude:
|
||||||
|
- 'app/helpers/attachments_helper.rb'
|
||||||
|
|
||||||
Style/Documentation:
|
Style/Documentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle.
|
# Configuration parameters: EnforcedStyle.
|
||||||
# SupportedStyles: allowed_in_returns, forbidden
|
# SupportedStyles: allowed_in_returns, forbidden
|
||||||
Style/DoubleNegation:
|
Style/DoubleNegation:
|
||||||
@ -1206,6 +1244,7 @@ Style/HashEachMethods:
|
|||||||
- 'test/functional/issues_custom_fields_visibility_test.rb'
|
- 'test/functional/issues_custom_fields_visibility_test.rb'
|
||||||
- 'test/unit/auth_source_ldap_test.rb'
|
- 'test/unit/auth_source_ldap_test.rb'
|
||||||
|
|
||||||
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AllowIfModifier.
|
# Configuration parameters: AllowIfModifier.
|
||||||
Style/IfInsideElse:
|
Style/IfInsideElse:
|
||||||
Exclude:
|
Exclude:
|
||||||
@ -1310,11 +1349,10 @@ Style/MultilineTernaryOperator:
|
|||||||
- 'lib/redmine/ciphering.rb'
|
- 'lib/redmine/ciphering.rb'
|
||||||
- 'lib/redmine/scm/adapters/filesystem_adapter.rb'
|
- 'lib/redmine/scm/adapters/filesystem_adapter.rb'
|
||||||
|
|
||||||
|
# Cop supports --auto-correct.
|
||||||
Style/MultipleComparison:
|
Style/MultipleComparison:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/helpers/application_helper.rb'
|
- 'app/helpers/application_helper.rb'
|
||||||
- 'app/helpers/workflows_helper.rb'
|
|
||||||
- 'app/models/import.rb'
|
|
||||||
- 'app/models/version.rb'
|
- 'app/models/version.rb'
|
||||||
- 'app/models/wiki_page.rb'
|
- 'app/models/wiki_page.rb'
|
||||||
|
|
||||||
@ -1434,6 +1472,15 @@ Style/PreferredHashMethods:
|
|||||||
Style/Proc:
|
Style/Proc:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
# Configuration parameters: Methods.
|
||||||
|
Style/RedundantArgument:
|
||||||
|
Exclude:
|
||||||
|
- 'app/controllers/account_controller.rb'
|
||||||
|
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
|
||||||
|
- 'lib/redmine/scm/adapters/git_adapter.rb'
|
||||||
|
- 'test/functional/projects_controller_test.rb'
|
||||||
|
- 'test/unit/issue_test.rb'
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/RedundantAssignment:
|
Style/RedundantAssignment:
|
||||||
Exclude:
|
Exclude:
|
||||||
@ -1587,6 +1634,7 @@ Style/Semicolon:
|
|||||||
Style/SingleLineMethods:
|
Style/SingleLineMethods:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AllowModifier.
|
# Configuration parameters: AllowModifier.
|
||||||
Style/SoleNestedConditional:
|
Style/SoleNestedConditional:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|||||||
2
Gemfile
2
Gemfile
@ -92,7 +92,7 @@ group :test do
|
|||||||
gem 'capybara', '~> 3.31.0'
|
gem 'capybara', '~> 3.31.0'
|
||||||
gem "selenium-webdriver"
|
gem "selenium-webdriver"
|
||||||
# RuboCop
|
# RuboCop
|
||||||
gem 'rubocop', '~> 1.0.0'
|
gem 'rubocop', '~> 1.5.2'
|
||||||
gem 'rubocop-performance', '~> 1.8.0'
|
gem 'rubocop-performance', '~> 1.8.0'
|
||||||
gem 'rubocop-rails', '~> 2.8.0'
|
gem 'rubocop-rails', '~> 2.8.0'
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user