From dbc3af917a7460fd87d048f332186de4bd929cad Mon Sep 17 00:00:00 2001 From: Bertocq Date: Fri, 7 Jul 2017 21:24:45 +0200 Subject: [PATCH] Update rubocop_todo list with rubocop --auto-gen-config --- .rubocop_todo.yml | 703 +++++++++++++++++++++++++++++++--------------- 1 file changed, 483 insertions(+), 220 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 5ce274570..ffe5432ad 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,11 +1,268 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2016-11-25 13:34:56 +0100 using RuboCop version 0.45.0. +# on 2017-07-07 21:23:30 +0200 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: 23 +# Cop supports --auto-correct. +# Configuration parameters: Include, TreatCommentsAsGroupSeparators. +# Include: **/Gemfile, **/gems.rb +Bundler/OrderedGems: + Exclude: + - 'Gemfile' + +# Offense count: 45 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedHashRocketStyle, SupportedHashRocketStyles, EnforcedColonStyle, SupportedColonStyles, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles. +# SupportedHashRocketStyles: key, separator, table +# SupportedColonStyles: key, separator, table +# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit +Layout/AlignHash: + Exclude: + - 'app/controllers/officing/results_controller.rb' + - 'spec/controllers/legislation/annotations_controller_spec.rb' + - 'spec/features/admin/banners_spec.rb' + +# Offense count: 50 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: with_first_parameter, with_fixed_indentation +Layout/AlignParameters: + Enabled: false + +# Offense count: 11 +# Cop supports --auto-correct. +Layout/ClosingParenthesisIndentation: + Exclude: + - 'spec/features/site_customization/custom_pages_spec.rb' + - 'spec/models/legislation/annotation_spec.rb' + - 'spec/rails_helper.rb' + +# Offense count: 51 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: leading, trailing +Layout/DotPosition: + Exclude: + - 'app/controllers/admin/poll/officer_assignments_controller.rb' + - 'app/controllers/admin/poll/polls_controller.rb' + - 'app/controllers/admin/poll/recounts_controller.rb' + - 'app/controllers/officing/final_recounts_controller.rb' + - 'app/controllers/officing/recounts_controller.rb' + - 'app/controllers/officing/residence_controller.rb' + - 'app/controllers/officing/results_controller.rb' + - 'app/models/poll/officer.rb' + - 'app/models/tag_cloud.rb' + - 'app/models/verification/management/managed_user.rb' + - 'lib/merged_comment_tree.rb' + +# Offense count: 8 +# Cop supports --auto-correct. +Layout/EmptyLineAfterMagicComment: + Exclude: + - 'bin/rspec' + - 'bin/spring' + - 'spec/features/debates_spec.rb' + - 'spec/features/proposal_ballots_spec.rb' + - 'spec/features/proposals_spec.rb' + - 'spec/mailers/devise_mailer_spec.rb' + - 'spec/models/debate_spec.rb' + - 'spec/models/proposal_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/EmptyLines: + Exclude: + - 'app/controllers/admin/budget_investment_milestones_controller.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Layout/EmptyLinesAroundMethodBody: + Exclude: + - 'app/models/abilities/administrator.rb' + - 'lib/graph_ql/api_types_creator.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. +Layout/ExtraSpacing: + Exclude: + - 'spec/factories.rb' + - 'spec/models/proposal_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses +Layout/FirstParameterIndentation: + Exclude: + - 'app/controllers/users_controller.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: SupportedStyles, IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_brackets +Layout/IndentArray: + EnforcedStyle: consistent + +# Offense count: 10 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_braces +Layout/IndentHash: + Exclude: + - 'spec/controllers/legislation/annotations_controller_spec.rb' + +# Offense count: 4 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent +Layout/IndentHeredoc: + Exclude: + - 'spec/factories.rb' + - 'spec/models/legislation/draft_version_spec.rb' + +# Offense count: 10 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: normal, rails +Layout/IndentationConsistency: + Exclude: + - 'spec/features/tracks_spec.rb' + - 'spec/models/budget/investment_spec.rb' + - 'spec/models/legislation/draft_version_spec.rb' + - 'spec/models/proposal_spec.rb' + +# Offense count: 23 +# Cop supports --auto-correct. +# Configuration parameters: Width, IgnoredPatterns. +Layout/IndentationWidth: + Enabled: false + +# Offense count: 7 +# Cop supports --auto-correct. +Layout/LeadingCommentSpace: + Exclude: + - 'Capfile' + - 'app/controllers/budgets/ballot/lines_controller.rb' + - 'spec/features/budgets/ballots_spec.rb' + - 'spec/features/comments/poll_questions_spec.rb' + - 'spec/features/officing/voters_spec.rb' + - 'spec/support/common_actions.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineArrayBraceLayout: + Exclude: + - 'app/controllers/valuation/budget_investments_controller.rb' + - 'app/controllers/valuation/spending_proposals_controller.rb' + - 'app/helpers/search_helper.rb' + +# Offense count: 9 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineHashBraceLayout: + Exclude: + - 'app/controllers/valuation/budget_investments_controller.rb' + - 'app/controllers/valuation/spending_proposals_controller.rb' + - 'app/models/budget/investment.rb' + - 'app/models/debate.rb' + - 'app/models/proposal.rb' + - 'app/models/spending_proposal.rb' + +# Offense count: 17 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineMethodCallBraceLayout: + Exclude: + - 'app/controllers/legislation/annotations_controller.rb' + - 'app/controllers/users_controller.rb' + - 'app/models/comment.rb' + - 'app/models/organization.rb' + - 'app/models/user.rb' + - 'spec/features/site_customization/custom_pages_spec.rb' + - 'spec/models/legislation/annotation_spec.rb' + - 'spec/rails_helper.rb' + +# Offense count: 71 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: aligned, indented, indented_relative_to_receiver +Layout/MultilineMethodCallIndentation: + Exclude: + - 'app/controllers/admin/poll/officer_assignments_controller.rb' + - 'app/controllers/admin/poll/polls_controller.rb' + - 'app/controllers/admin/poll/recounts_controller.rb' + - 'app/controllers/officing/final_recounts_controller.rb' + - 'app/controllers/officing/recounts_controller.rb' + - 'app/controllers/officing/residence_controller.rb' + - 'app/controllers/officing/results_controller.rb' + - 'app/models/poll/officer.rb' + - 'app/models/tag_cloud.rb' + - 'app/models/verification/management/managed_user.rb' + - 'lib/merged_comment_tree.rb' + - 'spec/models/comment_spec.rb' + - 'spec/models/debate_spec.rb' + - 'spec/models/proposal_spec.rb' + - 'spec/models/user_spec.rb' + +# Offense count: 8 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: aligned, indented +Layout/MultilineOperationIndentation: + Exclude: + - 'app/controllers/officing/results_controller.rb' + - 'app/helpers/users_helper.rb' + - 'app/helpers/valuation_helper.rb' + - 'app/models/user.rb' + - 'app/models/verification/letter.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/SpaceAfterColon: + Exclude: + - 'spec/features/admin/site_customization/pages_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment. +Layout/SpaceBeforeFirstArg: + Exclude: + - 'spec/factories.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Layout/SpaceInsideRangeLiteral: + Exclude: + - 'app/models/legislation/annotation.rb' + +# Offense count: 38 +Lint/AmbiguousBlockAssociation: + Exclude: + - 'spec/controllers/comments_controller_spec.rb' + - 'spec/controllers/debates_controller_spec.rb' + - 'spec/controllers/legislation/annotations_controller_spec.rb' + - 'spec/controllers/legislation/answers_controller_spec.rb' + - 'spec/lib/cache_spec.rb' + - 'spec/models/comment_spec.rb' + - 'spec/models/debate_spec.rb' + - 'spec/models/proposal_spec.rb' + - 'spec/models/user_spec.rb' + +# Offense count: 2 +Lint/HandleExceptions: + Exclude: + - 'app/controllers/legislation/annotations_controller.rb' + - 'spec/lib/graphql_spec.rb' + # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. @@ -14,79 +271,128 @@ Lint/InheritException: Exclude: - 'app/controllers/concerns/feature_flags.rb' -# Offense count: 13 +# Offense count: 1 +Lint/LiteralInCondition: + Exclude: + - 'app/models/budget/investment.rb' + +# Offense count: 51 Lint/ParenthesesAsGroupedExpression: Exclude: + - 'spec/factories.rb' - 'spec/features/admin/organizations_spec.rb' + - 'spec/features/budgets/investments_spec.rb' + - 'spec/features/campaigns_spec.rb' - 'spec/features/debates_spec.rb' + - 'spec/features/management/managed_users_spec.rb' + - 'spec/features/management/proposals_spec.rb' + - 'spec/features/management/spending_proposals_spec.rb' + - 'spec/features/management/users_spec.rb' - 'spec/features/proposals_spec.rb' - 'spec/models/debate_spec.rb' -# Offense count: 4 +# Offense count: 13 +# Cop supports --auto-correct. +Lint/StringConversionInInterpolation: + Exclude: + - 'app/models/poll/final_recount.rb' + - 'app/models/poll/null_result.rb' + - 'app/models/poll/partial_result.rb' + - 'app/models/poll/recount.rb' + - 'app/models/poll/white_result.rb' + +# Offense count: 15 # Cop supports --auto-correct. # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. Lint/UnusedBlockArgument: Exclude: - 'app/controllers/admin/spending_proposals_controller.rb' - 'app/models/ahoy/data_source.rb' + - 'lib/graph_ql/api_types_creator.rb' + - 'lib/graph_ql/query_type_creator.rb' + - 'spec/controllers/concerns/has_orders_spec.rb' + - 'spec/factories.rb' - 'spec/spec_helper.rb' -# Offense count: 5 +# Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods. Lint/UnusedMethodArgument: Exclude: - 'app/controllers/organizations/registrations_controller.rb' - - 'app/controllers/users/omniauth_callbacks_controller.rb' - 'app/controllers/users/registrations_controller.rb' + - 'app/mailers/mailer.rb' - 'app/models/abilities/everyone.rb' - - 'app/models/abilities/valuator.rb' -# Offense count: 135 +# Offense count: 278 Lint/UselessAssignment: Enabled: false -# Offense count: 41 -Metrics/AbcSize: - Max: 44 +# Offense count: 1 +Lint/Void: + Exclude: + - 'app/controllers/polls_controller.rb' -# Offense count: 4 +# Offense count: 74 +Metrics/AbcSize: + Max: 54 + +# Offense count: 454 +# Configuration parameters: CountComments, ExcludedMethods. +Metrics/BlockLength: + Max: 1071 + +# Offense count: 8 # Configuration parameters: CountComments. Metrics/ClassLength: - Max: 205 + Max: 256 -# Offense count: 5 +# Offense count: 10 Metrics/CyclomaticComplexity: - Max: 8 + Max: 10 -# Offense count: 52 -# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives. +# Offense count: 171 +# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https Metrics/LineLength: - Max: 307 + Max: 2542 -# Offense count: 28 +# Offense count: 53 # Configuration parameters: CountComments. Metrics/MethodLength: - Max: 38 + Max: 49 -# Offense count: 2 +# Offense count: 1 # Configuration parameters: CountComments. Metrics/ModuleLength: - Max: 193 + Max: 214 -# Offense count: 3 +# Offense count: 7 Metrics/PerceivedComplexity: Max: 11 -# Offense count: 4 +# Offense count: 6 # Cop supports --auto-correct. Performance/RedundantMatch: Exclude: + - 'app/controllers/valuation/budget_investments_controller.rb' - 'app/controllers/valuation/spending_proposals_controller.rb' - 'app/helpers/embed_videos_helper.rb' -# Offense count: 4 +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent. +Rails/Blank: + Exclude: + - 'app/controllers/management/base_controller.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Rails/Delegate: + Exclude: + - 'app/models/poll/question.rb' + +# Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: Whitelist. # Whitelist: find_by_sql @@ -96,18 +402,38 @@ Rails/DynamicFindBy: - 'app/controllers/users/registrations_controller.rb' - 'spec/features/management/users_spec.rb' -# Offense count: 4 +# Offense count: 2 +Rails/FilePath: + Exclude: + - 'app/controllers/sandbox_controller.rb' + - 'spec/spec_helper.rb' + +# Offense count: 16 # Cop supports --auto-correct. # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/FindBy: Exclude: + - 'app/models/budget/ballot.rb' + - 'app/models/geozone.rb' + - 'app/models/legislation/question.rb' + - 'app/models/officing/residence.rb' + - 'app/models/poll/voter.rb' - 'app/models/setting.rb' + - 'app/models/signature.rb' + - 'app/models/user.rb' - 'app/models/verification/email.rb' - 'app/models/verification/management/email.rb' - 'app/models/verification/residence.rb' -# Offense count: 24 +# Offense count: 1 +# Configuration parameters: Include. +# Include: app/models/**/*.rb +Rails/HasAndBelongsToMany: + Exclude: + - 'app/models/poll.rb' + +# Offense count: 37 # Cop supports --auto-correct. # Configuration parameters: Include. # Include: spec/**/*, test/**/* @@ -117,20 +443,40 @@ Rails/HttpPositionalArguments: - 'spec/controllers/concerns/has_filters_spec.rb' - 'spec/controllers/concerns/has_orders_spec.rb' - 'spec/controllers/debates_controller_spec.rb' + - 'spec/controllers/graphql_controller_spec.rb' + - 'spec/controllers/legislation/annotations_controller_spec.rb' + - 'spec/controllers/legislation/answers_controller_spec.rb' - 'spec/controllers/management/sessions_controller_spec.rb' - 'spec/controllers/pages_controller_spec.rb' - 'spec/controllers/users/registrations_controller_spec.rb' -# Offense count: 12 +# Offense count: 20 Rails/OutputSafety: Exclude: + - 'app/controllers/admin/legislation/draft_versions_controller.rb' + - 'app/controllers/admin/legislation/processes_controller.rb' + - 'app/controllers/admin/legislation/questions_controller.rb' + - 'app/controllers/budgets/investments_controller.rb' - 'app/controllers/spending_proposals_controller.rb' - 'app/helpers/application_helper.rb' - 'app/helpers/text_with_links_helper.rb' - 'app/helpers/users_helper.rb' - 'app/helpers/valuation_helper.rb' -# Offense count: 9 +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank. +Rails/Present: + Exclude: + - 'app/controllers/management/document_verifications_controller.rb' + +# Offense count: 70 +# Configuration parameters: Blacklist. +# Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters +Rails/SkipsModelValidations: + Enabled: false + +# Offense count: 10 Style/AccessorMethodName: Exclude: - 'app/controllers/application_controller.rb' @@ -138,34 +484,17 @@ Style/AccessorMethodName: - 'app/controllers/management/proposals_controller.rb' - 'app/controllers/management/spending_proposals_controller.rb' - 'app/controllers/proposals_controller.rb' + - 'lib/merged_comment_tree.rb' -# Offense count: 30 +# Offense count: 1 # Cop supports --auto-correct. -# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles. -# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit -Layout/AlignHash: +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: braces, no_braces, context_dependent +Style/BracesAroundHashParameters: Exclude: - - 'spec/features/admin/banners_spec.rb' + - 'app/models/concerns/searchable.rb' -# Offense count: 21 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: with_first_parameter, with_fixed_indentation -Layout/AlignParameters: - Exclude: - - 'app/helpers/search_helper.rb' - - 'app/models/verification/management/email.rb' - - 'bin/rspec' - - 'bin/spring' - - 'spec/features/admin/spending_proposals_spec.rb' - - 'spec/features/spending_proposals_spec.rb' - - 'spec/features/valuation/spending_proposals_spec.rb' - - 'spec/features/verification/verified_user_spec.rb' - - 'spec/i18n_spec.rb' - - 'spec/models/user_spec.rb' - - 'spec/rails_helper.rb' - -# Offense count: 57 +# Offense count: 119 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: nested, compact Style/ClassAndModuleChildren: @@ -178,32 +507,28 @@ Style/ClassVars: - 'app/models/organization.rb' - 'app/models/user.rb' -# Offense count: 1 +# Offense count: 6 # Cop supports --auto-correct. -Layout/ClosingParenthesisIndentation: +Style/ColonMethodCall: Exclude: - - 'spec/rails_helper.rb' + - 'spec/models/budget/investment_spec.rb' -# Offense count: 4 +# Offense count: 12 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly. +# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions. # SupportedStyles: assign_to_condition, assign_inside_condition Style/ConditionalAssignment: Exclude: + - 'app/controllers/admin/poll/booth_assignments_controller.rb' + - 'app/controllers/admin/poll/officer_assignments_controller.rb' + - 'app/controllers/admin/poll/questions_controller.rb' - 'app/controllers/comments_controller.rb' - 'app/controllers/management/spending_proposals_controller.rb' + - 'app/controllers/officing/final_recounts_controller.rb' + - 'app/controllers/officing/recounts_controller.rb' - 'app/controllers/spending_proposals_controller.rb' - 'app/controllers/verification/sms_controller.rb' - -# Offense count: 6 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: leading, trailing -Layout/DotPosition: - Exclude: - - 'app/models/banner.rb' - - 'app/models/tag_cloud.rb' - - 'app/models/verification/management/managed_user.rb' + - 'lib/graph_ql/api_types_creator.rb' # Offense count: 1 Style/DoubleNegation: @@ -216,79 +541,46 @@ Style/EmptyCaseCondition: Exclude: - 'app/models/concerns/verification.rb' -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses -Layout/FirstParameterIndentation: +# Offense count: 2 +# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms. +# 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 +Style/FileName: Exclude: - - 'app/controllers/users_controller.rb' + - 'Capfile' + - 'Gemfile' -# Offense count: 32 +# Offense count: 56 # Configuration parameters: MinBodyLength. Style/GuardClause: Enabled: false -# Offense count: 6 +# Offense count: 12 # Cop supports --auto-correct. # Configuration parameters: MaxLineLength. Style/IfUnlessModifier: Exclude: - 'app/controllers/annotations_controller.rb' + - 'app/controllers/application_controller.rb' + - 'app/controllers/graphql_controller.rb' + - 'app/controllers/legislation/annotations_controller.rb' + - 'app/controllers/valuation/budget_investments_controller.rb' - 'app/controllers/verification/letter_controller.rb' - 'app/controllers/welcome_controller.rb' - 'app/helpers/embed_videos_helper.rb' + - 'app/mailers/mailer.rb' - 'app/models/proposal.rb' - 'app/models/spending_proposal.rb' -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: SupportedStyles, IndentationWidth. -# SupportedStyles: special_inside_parentheses, consistent, align_brackets -Layout/IndentArray: - EnforcedStyle: consistent - # Offense count: 4 # Cop supports --auto-correct. -# Configuration parameters: SupportedStyles, IndentationWidth. -# SupportedStyles: special_inside_parentheses, consistent, align_braces -Layout/IndentHash: - EnforcedStyle: consistent - -# Offense count: 3 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: normal, rails -Layout/IndentationConsistency: - Exclude: - - 'spec/features/tracks_spec.rb' - - 'spec/models/proposal_spec.rb' - -# Offense count: 11 -# Cop supports --auto-correct. -# Configuration parameters: Width. -Layout/IndentationWidth: - Exclude: - - 'app/controllers/annotations_controller.rb' - - 'app/helpers/flags_helper.rb' - - 'app/mailers/devise_mailer.rb' - - 'app/mailers/mailer.rb' - - 'app/models/ahoy/data_source.rb' - - 'app/models/comment_notifier.rb' - - 'app/models/concerns/search_cache.rb' - - 'spec/features/comments/proposals_spec.rb' - - 'spec/features/moderation/users_spec.rb' - - 'spec/features/tracks_spec.rb' - - 'spec/features/verification/verified_user_spec.rb' - -# Offense count: 2 -# Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: line_count_dependent, lambda, literal Style/Lambda: Exclude: - - 'app/models/banner.rb' + - 'app/models/comment.rb' - 'app/models/direct_message.rb' + - 'app/models/vote.rb' + - 'lib/graph_ql/api_types_creator.rb' # Offense count: 1 # Cop supports --auto-correct. @@ -304,101 +596,58 @@ Style/MethodDefParentheses: Exclude: - 'spec/helpers/comments_helper_spec.rb' -# Offense count: 3 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: symmetrical, new_line, same_line -Layout/MultilineArrayBraceLayout: - Exclude: - - 'app/controllers/valuation/spending_proposals_controller.rb' - - 'app/helpers/search_helper.rb' - # Offense count: 1 Style/MultilineBlockChain: Exclude: - 'app/controllers/valuation/spending_proposals_controller.rb' -# Offense count: 2 -# Cop supports --auto-correct. -Layout/MultilineBlockLayout: - Exclude: - - 'app/models/banner.rb' - - 'spec/features/users_auth_spec.rb' - -# Offense count: 6 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: symmetrical, new_line, same_line -Layout/MultilineHashBraceLayout: - Exclude: - - 'app/controllers/valuation/spending_proposals_controller.rb' - - 'app/models/debate.rb' - - 'app/models/proposal.rb' - - 'app/models/spending_proposal.rb' - -# Offense count: 2 +# Offense count: 1 # Cop supports --auto-correct. Style/MultilineIfThen: Exclude: - 'app/controllers/management/users_controller.rb' - - 'lib/census_api.rb' -# Offense count: 6 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: symmetrical, new_line, same_line -Layout/MultilineMethodCallBraceLayout: - Exclude: - - 'app/controllers/users_controller.rb' - - 'app/models/comment.rb' - - 'app/models/organization.rb' - - 'app/models/user.rb' - - 'spec/rails_helper.rb' - -# Offense count: 33 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: aligned, indented, indented_relative_to_receiver -Layout/MultilineMethodCallIndentation: - Exclude: - - 'app/models/banner.rb' - - 'app/models/tag_cloud.rb' - - 'app/models/verification/management/managed_user.rb' - - 'spec/models/comment_spec.rb' - - 'spec/models/debate_spec.rb' - - 'spec/models/proposal_spec.rb' - - 'spec/models/user_spec.rb' - -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: aligned, indented -Layout/MultilineOperationIndentation: - Exclude: - - 'app/helpers/users_helper.rb' - - 'app/helpers/valuation_helper.rb' - - 'app/models/verification/letter.rb' - -# Offense count: 5 +# Offense count: 15 # Cop supports --auto-correct. Style/MutableConstant: Exclude: - 'app/models/activity.rb' + - 'app/models/budget/reclassified_vote.rb' + - 'app/models/legislation/draft_version.rb' + - 'app/models/poll/null_result.rb' + - 'app/models/poll/partial_result.rb' + - 'app/models/poll/white_result.rb' - 'app/models/proposal.rb' + - 'app/models/signature_sheet.rb' + - 'app/models/site_customization/content_block.rb' + - 'app/models/site_customization/image.rb' + - 'app/models/site_customization/page.rb' + - 'lib/graph_ql/api_types_creator.rb' - 'lib/tag_sanitizer.rb' - 'lib/wysiwyg_sanitizer.rb' -# Offense count: 17 +# Offense count: 29 # Cop supports --auto-correct. Style/NestedParenthesizedCalls: Exclude: - 'spec/features/debates_spec.rb' + - 'spec/features/emails_spec.rb' + - 'spec/features/valuation/budget_investments_spec.rb' - 'spec/features/valuation/spending_proposals_spec.rb' - 'spec/helpers/settings_helper_spec.rb' - 'spec/helpers/verification_helper_spec.rb' -# Offense count: 12 +# Offense count: 1 # Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. +# SupportedStyles: skip_modifier_ifs, always +Style/Next: + Exclude: + - 'app/controllers/officing/results_controller.rb' + +# Offense count: 54 +# Cop supports --auto-correct. +# Configuration parameters: Strict. Style/NumericLiterals: MinDigits: 9 @@ -414,9 +663,9 @@ Style/NumericPredicate: - 'app/helpers/banners_helper.rb' - 'app/helpers/debates_helper.rb' - 'app/helpers/votes_helper.rb' + - 'app/models/budget/ballot.rb' - 'app/models/concerns/conflictable.rb' - 'app/models/concerns/taggable.rb' - - 'app/models/concerns/verification.rb' - 'app/models/debate.rb' - 'app/models/lock.rb' - 'app/models/user.rb' @@ -439,7 +688,7 @@ Style/ParenthesesAroundCondition: - 'app/models/debate.rb' - 'app/models/proposal.rb' -# Offense count: 6 +# Offense count: 11 # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist. # NamePrefix: is_, has_, have_ # NamePrefixBlacklist: is_, has_, have_ @@ -451,10 +700,11 @@ Style/PredicateName: - 'app/controllers/concerns/has_orders.rb' - 'app/helpers/banners_helper.rb' - 'app/helpers/debates_helper.rb' + - 'app/models/budget/ballot.rb' - 'app/models/user.rb' - 'lib/census_api.rb' -# Offense count: 3 +# Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: compact, exploded @@ -462,18 +712,20 @@ Style/RaiseArgs: Exclude: - 'app/controllers/management/base_controller.rb' - 'app/controllers/users/omniauth_callbacks_controller.rb' + - 'app/controllers/valuation/budget_investments_controller.rb' - 'app/controllers/valuation/spending_proposals_controller.rb' -# Offense count: 16 +# Offense count: 2 +# Cop supports --auto-correct. +Style/RedundantBegin: + Exclude: + - 'app/controllers/graphql_controller.rb' + - 'app/models/legislation/annotation.rb' + +# Offense count: 55 # Cop supports --auto-correct. Style/RedundantParentheses: - Exclude: - - 'app/controllers/admin/settings_controller.rb' - - 'app/helpers/proposals_helper.rb' - - 'spec/features/admin/organizations_spec.rb' - - 'spec/features/debates_spec.rb' - - 'spec/features/proposals_spec.rb' - - 'spec/models/debate_spec.rb' + Enabled: false # Offense count: 3 # Cop supports --auto-correct. @@ -484,43 +736,54 @@ Style/RegexpLiteral: - 'app/helpers/embed_videos_helper.rb' - 'spec/customization_engine_spec.rb' -# Offense count: 2 +# Offense count: 6 # Cop supports --auto-correct. Style/RescueModifier: Exclude: - - 'app/controllers/concerns/commentable_actions.rb' + - 'app/controllers/budgets/investments_controller.rb' + - 'app/controllers/concerns/search.rb' - 'app/controllers/verification/sms_controller.rb' + - 'app/models/concerns/measurable.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: ConvertCodeThatCanStartToReturnNil. +Style/SafeNavigation: + Exclude: + - 'app/models/signature.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: single_quotes, double_quotes +Style/StringLiteralsInInterpolation: + Exclude: + - 'spec/features/budgets/investments_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline. +# SupportedStylesForMultiline: comma, consistent_comma, no_comma +Style/TrailingCommaInArguments: + Exclude: + - 'app/controllers/legislation/answers_controller.rb' # Offense count: 9 -# Cop supports --auto-correct. -# Configuration parameters: IgnoredMethods. -# IgnoredMethods: respond_to, define_method -Style/SymbolProc: - Exclude: - - 'app/controllers/admin/settings_controller.rb' - - 'app/controllers/notifications_controller.rb' - - 'app/controllers/organizations/registrations_controller.rb' - - 'lib/manager_authenticator.rb' - - 'spec/factories.rb' - -# Offense count: 13 # Configuration parameters: SupportedStyles. +# SupportedStyles: snake_case, camelCase +Style/VariableName: + EnforcedStyle: snake_case + +# Offense count: 107 +# Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: snake_case, normalcase, non_integer Style/VariableNumber: - EnforcedStyle: normalcase + Enabled: false -# Offense count: 9 +# Offense count: 31 # Cop supports --auto-correct. # Configuration parameters: SupportedStyles, WordRegex. # SupportedStyles: percent, brackets Style/WordArray: EnforcedStyle: percent - MinSize: 3 - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: braces, no_braces, context_dependent -Style/BracesAroundHashParameters: - Exclude: - - 'app/models/concerns/searchable.rb' + MinSize: 9