diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f7b580b0a..0b2de271b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,11 +1,21 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 100` -# on 2018-04-09 16:05:53 -0700 using RuboCop version 0.54.0. +# on 2018-04-27 22:49:03 +0300 using RuboCop version 0.55.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 # versions of RuboCop, may require this file to be generated again. +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: Include, TreatCommentsAsGroupSeparators. +# Include: **/*.gemfile, **/Gemfile, **/gems.rb +Bundler/OrderedGems: + Exclude: + - 'gemfiles/rails_4_2.gemfile' + - 'gemfiles/rails_5_0.gemfile' + - 'gemfiles/rails_5_1.gemfile' + # Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: Include, TreatCommentsAsGroupSeparators. @@ -14,6 +24,12 @@ Gemspec/OrderedDependencies: Exclude: - 'devise_token_auth.gemspec' +# Offense count: 1 +# Cop supports --auto-correct. +Layout/ClosingParenthesisIndentation: + Exclude: + - 'app/controllers/devise_token_auth/passwords_controller.rb' + # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines. @@ -66,6 +82,14 @@ Layout/ExtraSpacing: - 'test/dummy/config/initializers/omniauth.rb' - 'test/dummy/db/migrate/20141222035835_devise_token_auth_create_only_email_users.rb' +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses +Layout/FirstParameterIndentation: + Exclude: + - 'app/controllers/devise_token_auth/passwords_controller.rb' + # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: Width, IgnoredPatterns. @@ -89,14 +113,6 @@ Layout/MultilineBlockLayout: Exclude: - 'lib/generators/devise_token_auth/install_generator.rb' -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, IndentationWidth. -# SupportedStyles: aligned, indented, indented_relative_to_receiver -Layout/MultilineMethodCallIndentation: - Exclude: - - 'test/controllers/devise_token_auth/sessions_controller_test.rb' - # Offense count: 1 # Cop supports --auto-correct. Layout/SpaceAfterColon: @@ -131,6 +147,12 @@ Layout/SpaceBeforeBlockBraces: - 'lib/devise_token_auth/rails/routes.rb' - 'test/dummy/app/models/user.rb' +# Offense count: 1 +# Cop supports --auto-correct. +Layout/SpaceBeforeSemicolon: + Exclude: + - 'lib/devise_token_auth/errors.rb' + # Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. @@ -195,62 +217,46 @@ Lint/UnusedBlockArgument: - 'test/dummy/app/controllers/custom/registrations_controller.rb' - 'test/dummy/config/initializers/omniauth.rb' -# Offense count: 4 +# Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods. Lint/UnusedMethodArgument: Exclude: - 'app/controllers/devise_token_auth/omniauth_callbacks_controller.rb' - 'app/controllers/devise_token_auth/unlocks_controller.rb' - - 'lib/devise_token_auth/engine.rb' - 'lib/generators/devise_token_auth/install_generator.rb' -# Offense count: 3 +# Offense count: 2 Lint/UriEscapeUnescape: Exclude: - 'test/controllers/devise_token_auth/omniauth_callbacks_controller_test.rb' - - 'test/controllers/devise_token_auth/registrations_controller_test.rb' - 'test/controllers/overrides/confirmations_controller_test.rb' -# Offense count: 35 +# Offense count: 31 Metrics/AbcSize: Max: 76 # Offense count: 1 # Configuration parameters: CountComments, ExcludedMethods. Metrics/BlockLength: - Exclude: - - 'app/models/devise_token_auth/concerns/user.rb' + Max: 42 -# Offense count: 15 +# Offense count: 14 # Configuration parameters: CountComments. Metrics/ClassLength: Max: 698 -# Offense count: 14 +# Offense count: 12 Metrics/CyclomaticComplexity: Max: 17 -# Offense count: 92 +# Offense count: 74 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https Metrics/LineLength: - Exclude: - - 'app/controllers/devise_token_auth/application_controller.rb' - - 'app/controllers/devise_token_auth/concerns/set_user_by_token.rb' - - 'app/controllers/devise_token_auth/omniauth_callbacks_controller.rb' - - 'app/controllers/devise_token_auth/passwords_controller.rb' - - 'app/controllers/devise_token_auth/registrations_controller.rb' - - 'app/controllers/devise_token_auth/sessions_controller.rb' - - 'app/controllers/devise_token_auth/unlocks_controller.rb' - - 'app/models/devise_token_auth/concerns/user.rb' - - 'app/models/devise_token_auth/concerns/user_omniauth_callbacks.rb' - - 'app/validators/email_validator.rb' - - 'lib/devise_token_auth/engine.rb' - - 'lib/devise_token_auth/rails/routes.rb' - - 'lib/generators/devise_token_auth/install_generator.rb' + Max: 189 -# Offense count: 35 +# Offense count: 32 # Configuration parameters: CountComments. Metrics/MethodLength: Max: 63 @@ -260,7 +266,7 @@ Metrics/MethodLength: Metrics/ModuleLength: Max: 1037 -# Offense count: 13 +# Offense count: 11 Metrics/PerceivedComplexity: Max: 19 @@ -287,7 +293,7 @@ Naming/PredicateName: # Offense count: 2 # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. -# AllowedNames: io, id, to +# AllowedNames: io, id, to, by, on, in, at Naming/UncommunicativeMethodParamName: Exclude: - 'app/controllers/devise_token_auth/application_controller.rb' @@ -300,12 +306,6 @@ Performance/RedundantMerge: Exclude: - 'app/controllers/devise_token_auth/omniauth_callbacks_controller.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Performance/RegexpMatch: - Exclude: - - 'app/validators/email_validator.rb' - # Offense count: 4 # Cop supports --auto-correct. Performance/StringReplacement: @@ -322,11 +322,10 @@ Style/BarePercentLiterals: Exclude: - 'app/controllers/devise_token_auth/omniauth_callbacks_controller.rb' -# Offense count: 2 +# Offense count: 1 # Cop supports --auto-correct. Style/ColonMethodCall: Exclude: - - 'lib/devise_token_auth/engine.rb' - 'lib/devise_token_auth/rails/routes.rb' # Offense count: 3 @@ -335,7 +334,7 @@ Style/CommentedKeyword: - 'app/controllers/devise_token_auth/concerns/set_user_by_token.rb' - 'test/controllers/demo_user_controller_test.rb' -# Offense count: 3 +# Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. # SupportedStyles: assign_to_condition, assign_inside_condition @@ -343,14 +342,13 @@ Style/ConditionalAssignment: Exclude: - 'app/controllers/devise_token_auth/application_controller.rb' - 'app/controllers/devise_token_auth/concerns/resource_finder.rb' - - 'app/controllers/devise_token_auth/registrations_controller.rb' # Offense count: 2 Style/DateTime: Exclude: - 'app/models/devise_token_auth/concerns/user.rb' -# Offense count: 24 +# Offense count: 21 Style/Documentation: Exclude: - 'spec/**/*' @@ -361,7 +359,6 @@ Style/Documentation: - 'app/controllers/devise_token_auth/confirmations_controller.rb' - 'app/controllers/devise_token_auth/omniauth_callbacks_controller.rb' - 'app/controllers/devise_token_auth/passwords_controller.rb' - - 'app/controllers/devise_token_auth/registrations_controller.rb' - 'app/controllers/devise_token_auth/sessions_controller.rb' - 'app/controllers/devise_token_auth/token_validations_controller.rb' - 'app/controllers/devise_token_auth/unlocks_controller.rb' @@ -371,7 +368,6 @@ Style/Documentation: - 'lib/devise_token_auth.rb' - 'lib/devise_token_auth/controllers/helpers.rb' - 'lib/devise_token_auth/controllers/url_helpers.rb' - - 'lib/devise_token_auth/engine.rb' - 'lib/devise_token_auth/rails/routes.rb' - 'lib/devise_token_auth/url.rb' - 'lib/generators/devise_token_auth/install_generator.rb' @@ -412,18 +408,18 @@ Style/GuardClause: # Offense count: 1 # Cop supports --auto-correct. +# Configuration parameters: IgnoredMethods. Style/MethodCallWithoutArgsParentheses: Exclude: - 'test/models/user_test.rb' -# Offense count: 2 +# Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline Style/MethodDefParentheses: Exclude: - 'app/controllers/devise_token_auth/passwords_controller.rb' - - 'app/controllers/devise_token_auth/registrations_controller.rb' # Offense count: 9 Style/MixinUsage: @@ -469,14 +465,13 @@ Style/Not: Style/NumericLiterals: MinDigits: 15 -# Offense count: 2 +# Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, EnforcedStyle. # SupportedStyles: predicate, comparison Style/NumericPredicate: Exclude: - 'spec/**/*' - - 'app/controllers/devise_token_auth/confirmations_controller.rb' - 'test/dummy/app/models/user.rb' # Offense count: 3 @@ -493,22 +488,6 @@ Style/RescueModifier: Exclude: - 'app/models/devise_token_auth/concerns/user.rb' -# Offense count: 11 -# Cop supports --auto-correct. -# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist. -# Whitelist: present?, blank?, presence, try -Style/SafeNavigation: - Exclude: - - 'app/controllers/devise_token_auth/concerns/set_user_by_token.rb' - - 'app/controllers/devise_token_auth/confirmations_controller.rb' - - 'app/controllers/devise_token_auth/omniauth_callbacks_controller.rb' - - 'app/controllers/devise_token_auth/passwords_controller.rb' - - 'app/controllers/devise_token_auth/unlocks_controller.rb' - - 'app/models/devise_token_auth/concerns/user.rb' - - 'lib/devise_token_auth/engine.rb' - - 'test/dummy/app/controllers/overrides/confirmations_controller.rb' - - 'test/dummy/app/controllers/overrides/passwords_controller.rb' - # Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: AllowIfMethodIsEmpty. @@ -524,6 +503,18 @@ Style/SpecialGlobalVars: Exclude: - 'devise_token_auth.gemspec' +# Offense count: 106 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. +# SupportedStyles: single_quotes, double_quotes +Style/StringLiterals: + Exclude: + - 'Appraisals' + - 'gemfiles/rails_4_2.gemfile' + - 'gemfiles/rails_5_0.gemfile' + - 'gemfiles/rails_5_1.gemfile' + - 'lib/devise_token_auth.rb' + # Offense count: 7 # Cop supports --auto-correct. Style/SymbolLiteral: @@ -550,6 +541,14 @@ Style/TernaryParentheses: - 'test/lib/generators/devise_token_auth/install_generator_test.rb' - 'test/lib/generators/devise_token_auth/install_generator_with_namespace_test.rb' +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleForMultiline. +# SupportedStylesForMultiline: comma, consistent_comma, no_comma +Style/TrailingCommaInArrayLiteral: + Exclude: + - 'Appraisals' + # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: AllowNamedUnderscoreVariables. @@ -562,3 +561,9 @@ Style/TrailingUnderscoreVariable: Style/UnneededPercentQ: Exclude: - 'app/controllers/devise_token_auth/omniauth_callbacks_controller.rb' + +# Offense count: 74 +# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. +# URISchemes: http, https +Metrics/LineLength: + Max: 189