diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a84aa0c81..a9c491df9 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,12 +1,12 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2017-09-04 09:03:46 +0300 using RuboCop version 0.49.1. +# on 2017-08-23 18:09:30 +0300 using RuboCop version 0.49.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 # versions of RuboCop, may require this file to be generated again. -# Offense count: 17 +# Offense count: 16 # Cop supports --auto-correct. # Configuration parameters: Include, TreatCommentsAsGroupSeparators. # Include: **/Gemfile, **/gems.rb @@ -38,7 +38,7 @@ Layout/AlignHash: Exclude: - 'app/models/soap/arireg.rb' -# Offense count: 15 +# Offense count: 16 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: with_first_parameter, with_fixed_indentation @@ -54,15 +54,14 @@ Layout/AlignParameters: - 'app/models/registrar.rb' - 'spec/models/domain_spec.rb' -# Offense count: 4 +# Offense count: 3 # Cop supports --auto-correct. Layout/BlockEndNewline: Exclude: - - 'app/models/contact.rb' - 'app/models/invoice.rb' - 'spec/requests/epp/contact/info_spec.rb' -# Offense count: 31 +# Offense count: 34 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentOneStep, IndentationWidth. # SupportedStyles: case, end @@ -115,13 +114,13 @@ Layout/EmptyLineAfterMagicComment: - 'db/api_log_schema.rb' - 'db/whois_schema.rb' -# Offense count: 25 +# Offense count: 26 # Cop supports --auto-correct. # Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines. Layout/EmptyLineBetweenDefs: Enabled: false -# Offense count: 63 +# Offense count: 64 # Cop supports --auto-correct. Layout/EmptyLines: Enabled: false @@ -141,7 +140,7 @@ Layout/EmptyLinesAroundAccessModifier: Layout/EmptyLinesAroundBlockBody: Enabled: false -# Offense count: 19 +# Offense count: 20 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines @@ -268,7 +267,7 @@ Layout/MultilineArrayBraceLayout: - 'db/migrate/20150129144652_add_creator_and_updater.rb' - 'db/migrate/20150130191056_add_session_id_to_log.rb' -# Offense count: 90 +# Offense count: 80 # Cop supports --auto-correct. Layout/MultilineBlockLayout: Enabled: false @@ -282,13 +281,12 @@ Layout/MultilineHashBraceLayout: - 'app/models/depp/domain.rb' - 'app/models/epp/domain.rb' -# Offense count: 6 +# Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: symmetrical, new_line, same_line Layout/MultilineMethodCallBraceLayout: Exclude: - - 'app/models/epp/contact.rb' - 'app/presenters/domain_presenter.rb' - 'spec/jobs/domain_delete_confirm_email_job_spec.rb' - 'spec/jobs/domain_delete_forced_email_job_spec.rb' @@ -342,7 +340,7 @@ Layout/SpaceAroundBlockParameters: Exclude: - 'lib/tasks/convert.rake' -# Offense count: 299 +# Offense count: 300 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment. Layout/SpaceAroundOperators: @@ -408,7 +406,7 @@ Layout/SpaceInsideBrackets: - 'db/migrate/20140926121409_domain_related_archives.rb' - 'db/migrate/20141015135255_create_settings.rb' -# Offense count: 56 +# Offense count: 64 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces. # SupportedStyles: space, no_space, compact @@ -421,6 +419,7 @@ Layout/SpaceInsideHashLiteralBraces: - 'app/models/depp/domain.rb' - 'app/models/directo.rb' - 'app/models/domain_mail_model.rb' + - 'app/models/epp/contact.rb' - 'app/models/epp/domain.rb' - 'app/models/nameserver.rb' - 'app/models/soap/arireg.rb' @@ -462,13 +461,11 @@ Layout/TrailingBlankLines: Layout/TrailingWhitespace: Enabled: false -# Offense count: 30 +# Offense count: 18 Lint/AmbiguousBlockAssociation: Exclude: - 'spec/models/dns/zone_spec.rb' - - 'spec/requests/epp/contact/create/ident_spec.rb' - 'spec/requests/epp/contact/delete/used_spec.rb' - - 'spec/requests/epp/contact/update/ident_spec.rb' - 'spec/requests/epp/domain/create/account_balance_spec.rb' - 'spec/requests/epp/domain/create/optional_nameserver_spec.rb' - 'spec/requests/epp/domain/create/price_spec.rb' @@ -518,6 +515,11 @@ Lint/HandleExceptions: Exclude: - 'bin/rspec' +# Offense count: 1 +Lint/ImplicitStringConcatenation: + Exclude: + - 'spec/models/contact_spec.rb' + # Offense count: 1 Lint/NestedMethodDefinition: Exclude: @@ -548,25 +550,6 @@ Lint/StringConversionInInterpolation: - 'app/controllers/registrant/domains_controller.rb' - 'app/models/domain_mail_model.rb' -# Offense count: 14 -# Cop supports --auto-correct. -Lint/UnneededDisable: - Exclude: - - 'app/controllers/epp_controller.rb' - - 'app/models/account_activity.rb' - - 'app/models/certificate.rb' - - 'app/models/domain.rb' - - 'app/models/epp_session.rb' - - 'db/migrate/20141121093125_add_zonefile_procedure.rb' - - 'db/migrate/20141126140434_add_serial_to_zonefile_procedure.rb' - - 'db/migrate/20141202114457_remove_ttl_from_zonefile_ds.rb' - - 'db/migrate/20141203090115_fix_invalid_ips_in_zonefile_prodecure.rb' - - 'db/migrate/20141211095604_glue_records_fix_in_zonefile_procedure.rb' - - 'db/migrate/20141215085117_remove_ns_caching.rb' - - 'db/migrate/20151125155601_restore_ttl_to_zonefile.rb' - - 'db/migrate/20151127091716_restore_ttl_to_zonefile2.rb' - - 'lib/tasks/import.rake' - # Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. @@ -594,31 +577,36 @@ Lint/UselessAssignment: Lint/Void: Enabled: false -# Offense count: 156 +# Offense count: 155 Metrics/AbcSize: Max: 155 -# Offense count: 228 +# Offense count: 215 # Configuration parameters: CountComments, ExcludedMethods. Metrics/BlockLength: Max: 618 +# Offense count: 3 +# Configuration parameters: CountBlocks. +Metrics/BlockNesting: + Max: 4 + # Offense count: 32 # Configuration parameters: CountComments. Metrics/ClassLength: Max: 5794 -# Offense count: 21 +# Offense count: 22 Metrics/CyclomaticComplexity: - Max: 14 + Max: 23 -# Offense count: 1356 +# Offense count: 1337 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https Metrics/LineLength: Max: 7122 -# Offense count: 181 +# Offense count: 179 # Configuration parameters: CountComments. Metrics/MethodLength: Max: 5789 @@ -628,9 +616,9 @@ Metrics/MethodLength: Metrics/ParameterLists: Max: 6 -# Offense count: 17 +# Offense count: 18 Metrics/PerceivedComplexity: - Max: 19 + Max: 25 # Offense count: 2 # Cop supports --auto-correct. @@ -646,6 +634,13 @@ Performance/RedundantMatch: - 'app/models/certificate.rb' - 'lib/devise_custom_failure.rb' +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: MaxKeyValuePairs. +Performance/RedundantMerge: + Exclude: + - 'app/models/epp/contact.rb' + # Offense count: 2 # Cop supports --auto-correct. Performance/Sample: @@ -721,7 +716,7 @@ Style/BlockComments: - 'app/models/soap/arireg.rb' - 'spec/spec_helper.rb' -# Offense count: 92 +# Offense count: 83 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods. # SupportedStyles: line_count_based, semantic, braces_for_chaining @@ -731,14 +726,14 @@ Style/BlockComments: Style/BlockDelimiters: Enabled: false -# Offense count: 71 +# Offense count: 72 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: braces, no_braces, context_dependent Style/BracesAroundHashParameters: Enabled: false -# Offense count: 55 +# Offense count: 54 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: nested, compact Style/ClassAndModuleChildren: @@ -776,22 +771,7 @@ Style/CommentAnnotation: - 'app/models/contact.rb' - 'app/views/epp/domains/info.xml.builder' -# Offense count: 9 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions. -# SupportedStyles: assign_to_condition, assign_inside_condition -Style/ConditionalAssignment: - Exclude: - - 'app/controllers/admin/contact_versions_controller.rb' - - 'app/controllers/epp_controller.rb' - - 'app/models/depp/user.rb' - - 'app/models/dnskey.rb' - - 'app/models/epp/contact.rb' - - 'app/models/epp/domain.rb' - - 'app/models/invoice.rb' - - 'app/models/legal_document.rb' - -# Offense count: 472 +# Offense count: 467 Style/Documentation: Enabled: false @@ -839,7 +819,7 @@ Style/FormatString: Exclude: - 'app/models/bank_link.rb' -# Offense count: 15 +# Offense count: 13 # Configuration parameters: MinBodyLength. Style/GuardClause: Exclude: @@ -853,8 +833,6 @@ Style/GuardClause: - 'app/models/epp/domain.rb' - 'app/models/invoice.rb' - 'app/models/keyrelay.rb' - - 'app/validators/contact/ident/code_validator.rb' - - 'lib/validators/iso8601_validator.rb' - 'lib/validators/phone_validator.rb' # Offense count: 40 @@ -900,12 +878,13 @@ Style/IfUnlessModifierOfIfUnless: Exclude: - 'app/models/epp/domain.rb' -# Offense count: 4 +# Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: InverseMethods, InverseBlocks. Style/InverseMethods: Exclude: - 'app/controllers/admin/domains_controller.rb' + - 'app/models/contact.rb' - 'app/models/domain.rb' - 'app/models/epp/domain.rb' @@ -974,7 +953,7 @@ Style/MultilineMemoization: Style/MutableConstant: Enabled: false -# Offense count: 6 +# Offense count: 7 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: both, prefix, postfix @@ -983,6 +962,7 @@ Style/NegatedIf: - 'app/controllers/admin/account_activities_controller.rb' - 'app/controllers/admin/epp_logs_controller.rb' - 'app/controllers/admin/repp_logs_controller.rb' + - 'app/models/contact.rb' - 'app/models/depp/domain.rb' - 'app/models/domain.rb' - 'app/models/legal_document.rb' @@ -1061,7 +1041,7 @@ Style/ParallelAssignment: - 'spec/models/domain_cron_spec.rb' - 'spec/models/domain_spec.rb' -# Offense count: 77 +# Offense count: 79 # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: @@ -1081,19 +1061,19 @@ Style/PreferredHashMethods: Exclude: - 'app/models/directo.rb' -# Offense count: 3 +# Offense count: 2 # Cop supports --auto-correct. Style/Proc: Exclude: - 'app/models/billing/price.rb' - - 'app/models/contact.rb' # Offense count: 1 # Cop supports --auto-correct. -# Configuration parameters: SupportedStyles. +# Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: compact, exploded Style/RaiseArgs: - EnforcedStyle: compact + Exclude: + - 'app/controllers/registrar/payments_controller.rb' # Offense count: 2 # Cop supports --auto-correct. @@ -1117,7 +1097,7 @@ Style/RedundantReturn: - 'app/models/keyrelay.rb' - 'app/models/setting.rb' -# Offense count: 21 +# Offense count: 20 # Cop supports --auto-correct. Style/RedundantSelf: Exclude: @@ -1127,7 +1107,6 @@ Style/RedundantSelf: - 'app/models/dnskey.rb' - 'app/models/domain.rb' - 'app/models/epp/domain.rb' - - 'app/models/epp/response.rb' - 'app/models/reserved_domain.rb' - 'app/models/user.rb' - 'lib/ext/xml_builder.rb' @@ -1147,14 +1126,15 @@ Style/RegexpLiteral: - 'db/data/20150601083516_add_cert_common_name.rb' - 'db/data/20150601083800_add_cert_md5.rb' -# Offense count: 2 +# Offense count: 3 # Cop supports --auto-correct. Style/RescueModifier: Exclude: + - 'app/models/epp/contact.rb' - 'app/models/legal_document.rb' - 'app/models/whois_record.rb' -# Offense count: 23 +# Offense count: 16 # Cop supports --auto-correct. # Configuration parameters: AllowAsExpressionSeparator. Style/Semicolon: @@ -1164,7 +1144,6 @@ Style/Semicolon: - 'app/controllers/registrar/polls_controller.rb' - 'app/models/domain.rb' - 'spec/requests/admin/billing/prices/expire_spec.rb' - - 'spec/requests/epp/contact/update/ident_spec.rb' - 'spec/requests/epp/domain/renew/expire_time_spec.rb' - 'spec/requests/epp/domain/renew/price_spec.rb' - 'spec/requests/epp/domain/update/registrant_change/same_as_current_spec.rb' @@ -1179,22 +1158,23 @@ Style/SignalException: - 'app/controllers/epp/contacts_controller.rb' - 'app/controllers/epp/domains_controller.rb' -# Offense count: 1195 +# Offense count: 1199 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline. # SupportedStyles: single_quotes, double_quotes Style/StringLiterals: Enabled: false -# Offense count: 3 +# Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: single_quotes, double_quotes Style/StringLiteralsInInterpolation: Exclude: + - 'app/models/contact.rb' - 'app/models/directo.rb' -# Offense count: 112 +# Offense count: 110 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, MinSize, SupportedStyles. # SupportedStyles: percent, brackets @@ -1219,12 +1199,23 @@ Style/TernaryParentheses: - 'app/controllers/epp/domains_controller.rb' - 'app/models/epp/domain.rb' -# Offense count: 19 +# Offense count: 14 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline. # SupportedStylesForMultiline: comma, consistent_comma, no_comma Style/TrailingCommaInLiteral: - Enabled: false + Exclude: + - 'app/controllers/epp/contacts_controller.rb' + - 'app/models/billing/price.rb' + - 'app/models/depp/contact.rb' + - 'app/models/depp/domain.rb' + - 'app/models/directo.rb' + - 'app/models/epp/domain.rb' + - 'app/presenters/domain_presenter.rb' + - 'lib/tasks/dev.rake' + - 'lib/tasks/import.rake' + - 'spec/models/billing/price_spec.rb' + - 'spec/presenters/domain_presenter_spec.rb' # Offense count: 9 # Cop supports --auto-correct.