From c27ab2d4a99546ddae701131e732b152728671d3 Mon Sep 17 00:00:00 2001 From: Agrim Mittal Date: Wed, 12 Apr 2017 20:21:44 +0530 Subject: [PATCH 1/3] update to rubocop v0.48.1 Updated other gems(nokogiri rails-dom-testing) to be able to update rubocop --- Gemfile | 2 +- Gemfile.lock | 35 ++++++++++++++++------------------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/Gemfile b/Gemfile index f1c77a63..1b882aab 100644 --- a/Gemfile +++ b/Gemfile @@ -202,7 +202,7 @@ group :development do gem 'guard-rspec', '~> 4.2.8' gem 'spring-commands-rspec' # for static code analisys - gem 'rubocop', require: false + gem 'rubocop', '~> 0.48.1', require: false # as database gem 'sqlite3' # to open mails diff --git a/Gemfile.lock b/Gemfile.lock index 581e0d4c..3bc396d4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,7 +58,7 @@ GEM user_agent_parser uuidtools arel (6.0.3) - ast (2.2.0) + ast (2.3.0) autoprefixer-rails (5.1.9) execjs json @@ -230,7 +230,7 @@ GEM thor (>= 0.14, < 2.0) jquery-ui-rails (4.2.1) railties (>= 3.2.16) - json (1.8.3) + json (1.8.6) json-schema (2.5.0) addressable (~> 2.3) jwt (1.0.0) @@ -261,7 +261,7 @@ GEM rake mini_magick (4.5.1) mini_portile2 (2.1.0) - minitest (5.9.0) + minitest (5.10.1) momentjs-rails (2.8.1) railties (>= 3.1) monetize (1.4.0) @@ -282,7 +282,6 @@ GEM nio4r (1.2.1) nokogiri (1.7.1) mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) oauth2 (0.9.4) faraday (>= 0.8, < 0.10) jwt (~> 1.0) @@ -314,7 +313,7 @@ GEM activerecord (>= 3.0, < 6.0) activesupport (>= 3.0, < 6.0) request_store (~> 1.1) - parser (2.3.0.3) + parser (2.4.0.0) ast (~> 2.2) pdf-core (0.2.5) phantomjs (2.1.1.0) @@ -322,7 +321,6 @@ GEM actionpack activesupport rails (>= 3.0.0) - pkg-config (1.1.7) poltergeist (1.9.0) capybara (~> 2.1) cliver (~> 0.3.1) @@ -375,9 +373,9 @@ GEM rails-assets-waypoints (4.0.0) rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) + rails-dom-testing (1.0.8) activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) + nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) @@ -396,7 +394,7 @@ GEM activesupport (= 4.2.7.1) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rainbow (2.1.0) + rainbow (2.2.1) rake (10.5.0) rb-fsevent (0.9.4) rb-inotify (0.9.4) @@ -442,15 +440,15 @@ GEM rspec-mocks (~> 3.0.0) rspec-support (~> 3.0.0) rspec-support (3.0.2) - rubocop (0.37.0) - parser (>= 2.3.0.2, < 3.0) + rubocop (0.48.1) + parser (>= 2.3.3.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 0.3) + unicode-display_width (~> 1.0, >= 1.0.1) ruby-oembed (0.8.14) ruby-openid (2.5.0) - ruby-progressbar (1.7.5) + ruby-progressbar (1.8.1) rubyzip (1.2.1) safe_yaml (1.0.4) sass (3.2.19) @@ -493,7 +491,7 @@ GEM term-ansicolor (1.3.2) tins (~> 1.0) thor (0.19.1) - thread_safe (0.3.5) + thread_safe (0.3.6) tilt (1.4.1) timecop (0.7.1) timers (1.1.0) @@ -502,14 +500,14 @@ GEM ttfunk (1.1.1) turbolinks (2.5.3) coffee-rails - tzinfo (1.2.2) + tzinfo (1.2.3) thread_safe (~> 0.1) uglifier (3.0.0) execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext unf_ext (0.0.7.2) - unicode-display_width (0.3.1) + unicode-display_width (1.2.1) unicode_utils (1.4.0) unobtrusive_flash (3.1.0) railties @@ -619,7 +617,7 @@ DEPENDENCIES rolify rspec-activemodel-mocks rspec-rails - rubocop + rubocop (~> 0.48.1) ruby-oembed sass-rails (>= 4.0.2) selectize-rails @@ -639,5 +637,4 @@ DEPENDENCIES whenever BUNDLED WITH - 1.14.3 - + 1.14.5 From 7a10d69f1499cafdeaff157025382ab77bbc3449 Mon Sep 17 00:00:00 2001 From: Agrim Mittal Date: Thu, 13 Apr 2017 00:00:02 +0530 Subject: [PATCH 2/3] regenerate rubocop_todo Automatically generated using --auto-gen-config --- .rubocop_todo.yml | 641 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 488 insertions(+), 153 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 330eb3cd..c2122773 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,11 +1,42 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2016-02-08 14:42:45 +0100 using RuboCop version 0.37.0. +# on 2017-04-21 21:35:17 +0530 using RuboCop version 0.48.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: 13 +# Cop supports --auto-correct. +# Configuration parameters: Include, TreatCommentsAsGroupSeparators. +# Include: **/Gemfile, **/gems.rb +Bundler/OrderedGems: + Exclude: + - 'Gemfile' + +# Offense count: 28 +Lint/AmbiguousBlockAssociation: + Exclude: + - 'app/models/comment.rb' + - 'app/models/event.rb' + - 'app/models/event_schedule.rb' + - 'app/models/ticket_purchase.rb' + - 'app/models/user.rb' + - 'spec/controllers/admin/conferences_controller_spec.rb' + - 'spec/controllers/admin/event_schedules_controller_spec.rb' + - 'spec/controllers/admin/registration_periods_controller_spec.rb' + - 'spec/controllers/proposals_controller_spec.rb' + - 'spec/controllers/schedules_controller_spec.rb' + - 'spec/models/user_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleAlignWith, SupportedStylesAlignWith. +# SupportedStylesAlignWith: either, start_of_block, start_of_line +Lint/BlockAlignment: + Exclude: + - 'lib/tasks/demo_data_for_development.rake' + # Offense count: 2 Lint/DuplicatedKey: Exclude: @@ -18,21 +49,33 @@ Lint/IneffectiveAccessModifier: - 'app/models/commercial.rb' - 'app/models/conference.rb' -# Offense count: 84 +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. +Lint/UnusedBlockArgument: + Exclude: + - 'lib/tasks/user.rake' + +# Offense count: 106 Metrics/AbcSize: Max: 75 -# Offense count: 12 +# Offense count: 225 +# Configuration parameters: CountComments, ExcludedMethods. +Metrics/BlockLength: + Max: 1364 + +# Offense count: 19 Metrics/CyclomaticComplexity: Max: 12 -# Offense count: 956 -# Configuration parameters: AllowHeredoc, AllowURI, URISchemes. +# Offense count: 1967 +# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https Metrics/LineLength: - Max: 208 + Max: 619 -# Offense count: 100 +# Offense count: 115 # Configuration parameters: CountComments. Metrics/MethodLength: Max: 56 @@ -40,15 +83,13 @@ Metrics/MethodLength: # Offense count: 1 # Configuration parameters: CountComments. Metrics/ModuleLength: - Max: 256 - Exclude: - - 'app/helpers/application_helper.rb' + Max: 472 -# Offense count: 7 +# Offense count: 14 Metrics/PerceivedComplexity: Max: 15 -# Offense count: 13 +# Offense count: 11 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, Include. # SupportedStyles: action, filter @@ -57,17 +98,24 @@ Rails/ActionFilter: Exclude: - 'app/controllers/admin/base_controller.rb' - 'app/controllers/admin/registrations_controller.rb' - - 'app/controllers/admin/schedules_controller.rb' - 'app/controllers/application_controller.rb' - - 'app/controllers/conference_controller.rb' - 'app/controllers/conference_registrations_controller.rb' - - 'app/controllers/proposal_controller.rb' - 'app/controllers/subscriptions_controller.rb' - 'app/controllers/ticket_purchases_controller.rb' - 'app/controllers/tickets_controller.rb' - 'app/controllers/users/omniauth_callbacks_controller.rb' -# Offense count: 101 +# Offense count: 9 +# Cop supports --auto-correct. +# Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent. +Rails/Blank: + Exclude: + - 'app/models/program.rb' + - 'app/models/user.rb' + - 'lib/tasks/update_resource_quantity.rake' + - 'spec/factories/event_schedule.rb' + +# Offense count: 140 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: strict, flexible Rails/Date: @@ -79,7 +127,23 @@ Rails/Delegate: Exclude: - 'app/serializers/speaker_serializer.rb' -# Offense count: 10 +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: Whitelist. +# Whitelist: find_by_sql +Rails/DynamicFindBy: + Exclude: + - 'app/controllers/admin/events_controller.rb' + - 'db/migrate/20140701123203_add_events_per_week_to_conference.rb' + +# Offense count: 4 +Rails/FilePath: + Exclude: + - 'spec/features/lodgings_spec.rb' + - 'spec/features/sponsor_spec.rb' + - 'spec/spec_helper.rb' + +# Offense count: 6 # Cop supports --auto-correct. # Configuration parameters: Include. # Include: app/models/**/*.rb @@ -88,7 +152,6 @@ Rails/FindBy: - 'app/models/conference.rb' - 'app/models/event.rb' - 'app/models/openid.rb' - - 'app/models/ticket.rb' - 'app/models/ticket_purchase.rb' - 'app/models/user.rb' @@ -100,35 +163,87 @@ Rails/FindEach: Exclude: - 'app/models/conference.rb' -# Offense count: 12 +# Offense count: 7 # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/HasAndBelongsToMany: Exclude: - 'app/models/conference.rb' - - 'app/models/event.rb' - 'app/models/qanswer.rb' - 'app/models/question.rb' - 'app/models/registration.rb' - - 'app/models/role.rb' - - 'app/models/social_event.rb' - - 'app/models/user.rb' - 'app/models/vchoice.rb' +# Offense count: 170 +# Cop supports --auto-correct. +# Configuration parameters: Include. +# Include: spec/**/*, test/**/* +Rails/HttpPositionalArguments: + Enabled: false + +# Offense count: 2 +Rails/OutputSafety: + Exclude: + - 'app/helpers/application_helper.rb' + - 'app/models/commercial.rb' + # Offense count: 10 # Cop supports --auto-correct. Rails/PluralizationGrammar: Exclude: - 'spec/models/conference_spec.rb' -# Offense count: 47 +# Offense count: 22 +# Cop supports --auto-correct. +# Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank. +Rails/Present: + Exclude: + - 'app/helpers/application_helper.rb' + - 'app/models/campaign.rb' + - 'app/models/cfp.rb' + - 'app/models/email_settings.rb' + - 'app/models/event.rb' + - 'app/models/program.rb' + - 'app/models/venue.rb' + +# Offense count: 52 +# Configuration parameters: Include. +# Include: db/migrate/*.rb +Rails/ReversibleMigration: + Exclude: + - 'db/migrate/20140530082708_remove_color_defaults.rb' + - 'db/migrate/20140605125153_update_event_states.rb' + - 'db/migrate/20140610173021_change_person_id_to_user_id_in_registrations.rb' + - 'db/migrate/20140611123926_change_person_id_to_user_id_in_votes.rb' + - 'db/migrate/20140623150541_drop_person_and_event_person_tables.rb' + - 'db/migrate/20140731165107_move_conference_contact_details_to_contact.rb' + - 'db/migrate/20140801164901_move_conference_media_to_commercial.rb' + - 'db/migrate/20140801170430_move_event_media_to_commercial.rb' + - 'db/migrate/20140820093735_migrating_supporter_registrations_to_ticket_users.rb' + - 'db/migrate/20140821103643_split_ticket_price_in_price_and_currency.rb' + - 'db/migrate/20140825093132_move_splashpage_attributes_from_conference_to_splashpage.rb' + - 'db/migrate/20140930092923_move_sponsor_email_to_contact.rb' + - 'db/migrate/20141117222919_drop_splash_descriptions_and_photo.rb' + - 'db/migrate/20141130182139_drop_table_event_attachments.rb' + +# Offense count: 5 +# Configuration parameters: Blacklist. +# Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters +Rails/SkipsModelValidations: + Exclude: + - 'app/controllers/payments_controller.rb' + - 'app/models/revision_observer.rb' + - 'db/migrate/20140730104658_migrate_roles_for_cancancan.rb' + - 'lib/tasks/user.rake' + +# Offense count: 46 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: strict, flexible Rails/TimeZone: Exclude: - - 'app/helpers/application_helper.rb' - 'app/models/comment.rb' - 'app/models/conference.rb' + - 'lib/tasks/dump_db.rake' - 'spec/controllers/admin/comments_controller_spec.rb' - 'spec/controllers/admin/programs_controller_spec.rb' - 'spec/factories/users.rb' @@ -145,13 +260,20 @@ Style/AccessorMethodName: - 'app/models/target.rb' - 'app/models/user.rb' -# Offense count: 4 +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: with_first_parameter, with_fixed_indentation +Style/AlignParameters: + Exclude: + - 'Vagrantfile' + +# Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: is_a?, kind_of? Style/ClassCheck: Exclude: - - 'app/helpers/application_helper.rb' - 'app/models/email_settings.rb' - 'app/models/revision_observer.rb' @@ -160,13 +282,12 @@ Style/ClassVars: Exclude: - 'spec/support/kneet_connections.rb' -# Offense count: 6 +# Offense count: 5 # Cop supports --auto-correct. Style/ClosingParenthesisIndentation: Exclude: - 'app/controllers/conference_registrations_controller.rb' - 'spec/support/omniauth_macros.rb' - - 'spec/views/admin/sponsors/index.html.haml_spec.rb' # Offense count: 2 # Cop supports --auto-correct. @@ -183,36 +304,28 @@ Style/CommentAnnotation: Exclude: - 'app/models/event_user.rb' -# Offense count: 17 +# Offense count: 14 # Cop supports --auto-correct. Style/CommentIndentation: Exclude: - 'app/controllers/admin/comments_controller.rb' - 'app/controllers/admin/difficulty_levels_controller.rb' - - 'app/controllers/admin/programs_controller.rb' - - 'app/models/ahoy/program.rb' - 'app/models/conference.rb' - 'app/models/program.rb' - 'app/models/track.rb' - 'spec/features/volunteers_spec.rb' -# Offense count: 7 +# Offense count: 3 # Cop supports --auto-correct. -# Configuration parameters: SingleLineConditionsOnly. +# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions. +# SupportedStyles: assign_to_condition, assign_inside_condition Style/ConditionalAssignment: Exclude: - - 'app/controllers/admin/schedules_controller.rb' - - 'app/controllers/admin/volunteers_controller.rb' - - 'app/controllers/conference_controller.rb' - - 'app/controllers/conference_registrations_controller.rb' - - 'app/controllers/admin/conference_controller.rb' - 'app/helpers/application_helper.rb' - - 'app/models/ticket_purchase.rb' - - 'app/models/conference.rb' - 'db/migrate/20140610165551_migrate_data_person_to_user.rb' - 'db/migrate/20140820124117_undo_wrong_migration20140801080705_add_users_to_events.rb' -# Offense count: 366 +# Offense count: 429 Style/Documentation: Enabled: false @@ -222,46 +335,73 @@ Style/ElseAlignment: Exclude: - 'app/helpers/application_helper.rb' +# Offense count: 2 +# Cop supports --auto-correct. +Style/EmptyCaseCondition: + Exclude: + - 'app/helpers/application_helper.rb' + # Offense count: 1 # Cop supports --auto-correct. -# Configuration parameters: AllowAdjacentOneLineDefs. -Style/EmptyLineBetweenDefs: +Style/EmptyLineAfterMagicComment: Exclude: - - 'app/models/call_for_paper.rb' + - 'spec/models/conference_spec.rb' -# Offense count: 98 +# Offense count: 107 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: empty_lines, no_empty_lines Style/EmptyLinesAroundBlockBody: Enabled: false +# Offense count: 1 +# Cop supports --auto-correct. +Style/EmptyLinesAroundExceptionHandlingKeywords: + Exclude: + - 'app/models/payment.rb' + # Offense count: 1 # Cop supports --auto-correct. Style/EmptyLiteral: Exclude: - 'spec/models/conference_spec.rb' -# Offense count: 17 +# Offense count: 9 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: compact, expanded +Style/EmptyMethod: + Exclude: + - 'app/controllers/admin/lodgings_controller.rb' + - 'app/controllers/admin/registration_periods_controller.rb' + - 'app/controllers/users_controller.rb' + - 'db/migrate/20121223115125_create_tracks_table.rb' + - 'db/migrate/20121223115135_create_events_table.rb' + - 'db/migrate/20130103134212_create_registrations_table.rb' + - 'db/migrate/20130206192339_rename_attending_social_events_with_partner.rb' + - 'db/migrate/20130216122155_set_registration_defaults_to_false.rb' + +# Offense count: 9 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. Style/ExtraSpacing: Exclude: - 'Guardfile' - - 'app/controllers/conference_registrations_controller.rb' - - 'app/models/conference.rb' - - 'app/models/event.rb' - - 'app/models/target.rb' - - 'app/models/ticket.rb' - - 'bin/rails' + - 'app/controllers/application_controller.rb' - 'config.ru' - 'db/migrate/20140623101032_create_ahoy_events.rb' - 'db/migrate/20140701123203_add_events_per_week_to_conference.rb' - 'db/migrate/20140719160903_create_delayed_jobs.rb' - - 'spec/controllers/conference_controller_spec.rb' - - 'spec/factories/splashpages.rb' - 'spec/models/conference_spec.rb' +# 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: + - 'Gemfile' + - 'Vagrantfile' + # Offense count: 38 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. @@ -269,64 +409,78 @@ Style/ExtraSpacing: Style/FirstParameterIndentation: Enabled: false -# Offense count: 6 +# Offense count: 22 # Configuration parameters: MinBodyLength. Style/GuardClause: Exclude: - - 'app/helpers/application_helper.rb' - - 'app/models/commercial.rb' - - 'app/models/conference.rb' - - 'app/models/user.rb' - - 'app/models/registration.rb' - - 'app/models/ticket.rb' - - 'app/serializers/conference_serializer.rb' + - 'app/controllers/admin/questions_controller.rb' - 'app/controllers/conference_registrations_controller.rb' - 'app/controllers/tickets_controller.rb' - - 'app/controllers/admin/questions_controller.rb' - -# Offense count: 14 -Style/IdenticalConditionalBranches: - Exclude: - - 'app/controllers/admin/campaigns_controller.rb' - - 'app/controllers/admin/difficulty_levels_controller.rb' - - 'app/controllers/admin/event_types_controller.rb' - - 'app/controllers/admin/rooms_controller.rb' - - 'app/controllers/admin/tracks_controller.rb' - - 'app/controllers/subscriptions_controller.rb' - -# Offense count: 1 -Style/IfInsideElse: - Exclude: - 'app/helpers/application_helper.rb' + - 'app/models/ability.rb' + - 'app/models/cfp.rb' + - 'app/models/commercial.rb' + - 'app/models/conference.rb' + - 'app/models/registration.rb' + - 'app/models/ticket.rb' + - 'app/models/user.rb' + - 'app/serializers/conference_serializer.rb' + - 'db/migrate/20140820124117_undo_wrong_migration20140801080705_add_users_to_events.rb' + - 'lib/tasks/data.rake' -# Offense count: 29 +# Offense count: 4 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. +# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys +Style/HashSyntax: + Exclude: + - 'Gemfile' + - 'lib/tasks/user.rake' + +# Offense count: 23 # Cop supports --auto-correct. # Configuration parameters: MaxLineLength. Style/IfUnlessModifier: - Enabled: false + Exclude: + - 'app/controllers/admin/events_controller.rb' + - 'app/controllers/api/v1/events_controller.rb' + - 'app/controllers/conference_registrations_controller.rb' + - 'app/controllers/users/omniauth_callbacks_controller.rb' + - 'app/helpers/application_helper.rb' + - 'app/models/commercial.rb' + - 'app/models/conference.rb' + - 'app/models/ticket_purchase.rb' + - 'app/models/user.rb' + - 'db/migrate/20151031092713_change_conference_id_to_venue_id_in_rooms.rb' + - 'lib/tasks/events_registrations.rake' + - 'spec/controllers/admin/conferences_controller_spec.rb' + - 'spec/features/omniauth_spec.rb' + - 'spec/support/flash.rb' # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_brackets Style/IndentArray: - Enabled: false + Exclude: + - 'app/models/conference.rb' -# Offense count: 5 +# Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: IndentationWidth. Style/IndentAssignment: Exclude: - 'app/helpers/application_helper.rb' - - 'app/models/ability.rb' - 'app/models/conference.rb' -# Offense count: 4 +# Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_braces Style/IndentHash: - Enabled: false + Exclude: + - 'app/models/user.rb' + - 'db/migrate/20140701123203_add_events_per_week_to_conference.rb' # Offense count: 3 # Cop supports --auto-correct. @@ -338,27 +492,16 @@ Style/IndentationConsistency: - 'app/models/event.rb' - 'spec/controllers/subscriptions_controller_spec.rb' -# Offense count: 10 +# Offense count: 7 # Cop supports --auto-correct. -# Configuration parameters: Width. +# Configuration parameters: Width, IgnoredPatterns. Style/IndentationWidth: Exclude: - 'app/helpers/application_helper.rb' - - 'db/migrate/20140701123203_add_events_per_week_to_conference.rb' - - 'db/migrate/20141031225545_add_require_handicapped_access_to_questions.rb' - - 'db/migrate/20141031225606_add_attending_with_partner_to_questions.rb' - - 'db/migrate/20141031225620_add_staying_at_suggested_hotel_to_questions.rb' - - 'db/migrate/20141031225635_add_attending_social_events_to_questions.rb' - - 'db/migrate/20141118162030_change_lodging_association_to_conference.rb' - - 'spec/features/event_types_spec.rb' - - 'spec/models/ability_spec.rb' - 'app/serializers/conference_serializer.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -Style/InfiniteLoop: - Exclude: - - 'app/models/datatable.rb' + - 'db/migrate/20140701123203_add_events_per_week_to_conference.rb' + - 'lib/tasks/demo_data_for_development.rake' + - 'spec/models/ability_spec.rb' # Offense count: 4 # Cop supports --auto-correct. @@ -375,12 +518,23 @@ Style/LineEndConcatenation: - 'spec/features/conference_spec.rb' - 'spec/features/registration_periods_spec.rb' -# Offense count: 7 +# Offense count: 6 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline Style/MethodDefParentheses: - Enabled: false + Exclude: + - 'app/models/conference.rb' + - 'app/models/user.rb' + - 'lib/tasks/demo_data_for_development.rake' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: symmetrical, new_line, same_line +Style/MultilineArrayBraceLayout: + Exclude: + - 'app/controllers/conference_registrations_controller.rb' # Offense count: 5 # Cop supports --auto-correct. @@ -388,45 +542,114 @@ Style/MultilineBlockLayout: Exclude: - 'app/serializers/conference_serializer.rb' -# Offense count: 58 +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: symmetrical, new_line, same_line +Style/MultilineHashBraceLayout: + Exclude: + - 'app/serializers/conference_serializer.rb' + - 'spec/models/event_spec.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +Style/MultilineIfModifier: + Exclude: + - 'app/controllers/conferences_controller.rb' + - 'app/controllers/schedules_controller.rb' + - 'app/models/cfp.rb' + - 'app/models/event.rb' + - 'app/models/registration_period.rb' + +# Offense count: 40 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: symmetrical, new_line, same_line +Style/MultilineMethodCallBraceLayout: + Enabled: false + +# Offense count: 53 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: aligned, indented +# SupportedStyles: aligned, indented, indented_relative_to_receiver Style/MultilineMethodCallIndentation: Enabled: false -# Offense count: 26 +# Offense count: 27 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: aligned, indented Style/MultilineOperationIndentation: - Enabled: false + Exclude: + - 'app/controllers/admin/conferences_controller.rb' + - 'app/controllers/admin/events_controller.rb' + - 'app/controllers/application_controller.rb' + - 'app/models/ability.rb' + - 'app/models/conference.rb' + - 'app/models/event.rb' + - 'db/migrate/20140701123203_add_events_per_week_to_conference.rb' -# Offense count: 3 +# Offense count: 2 # Cop supports --auto-correct. Style/MutableConstant: Exclude: - 'app/models/event_user.rb' - - 'app/models/role.rb' + - 'lib/tasks/migrate_config.rake' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: both, prefix, postfix +Style/NegatedIf: + Exclude: + - 'lib/tasks/update_resource_quantity.rake' # Offense count: 4 +# Cop supports --auto-correct. Style/NestedParenthesizedCalls: Exclude: - 'spec/features/conference_spec.rb' - 'spec/models/conference_spec.rb' -# Offense count: 21 +# Offense count: 26 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. # SupportedStyles: skip_modifier_ifs, always Style/Next: Enabled: false -# Offense count: 1 +# Offense count: 117 # Cop supports --auto-correct. +# Configuration parameters: EnforcedOctalStyle, SupportedOctalStyles. +# SupportedOctalStyles: zero_with_o, zero_only +Style/NumericLiteralPrefix: + Exclude: + - 'spec/controllers/admin/conferences_controller_spec.rb' + - 'spec/controllers/conference_registration_controller_spec.rb' + - 'spec/helpers/application_helper_spec.rb' + - 'spec/models/conference_spec.rb' + - 'spec/models/email_settings_spec.rb' + - 'spec/models/registration_spec.rb' + - 'spec/serializers/conference_serializer_spec.rb' + - 'spec/serializers/event_serializer_spec.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: Strict. Style/NumericLiterals: MinDigits: 15 +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles. +# SupportedStyles: predicate, comparison +Style/NumericPredicate: + Exclude: + - 'spec/**/*' + - 'app/controllers/admin/conferences_controller.rb' + - 'app/helpers/application_helper.rb' + - 'app/models/user.rb' + # Offense count: 3 Style/OptionalArguments: Exclude: @@ -441,12 +664,23 @@ Style/ParenthesesAroundCondition: - 'app/controllers/application_controller.rb' - 'app/helpers/application_helper.rb' -# Offense count: 1 +# Offense count: 17 # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: Exclude: - - 'app/serializers/event_serializer.rb' + - 'Gemfile' + - 'app/controllers/admin/users_controller.rb' + - 'app/models/ability.rb' + - 'app/models/comment.rb' + - 'app/models/commercial.rb' + - 'app/models/conference.rb' + - 'app/models/contact.rb' + - 'app/models/registration.rb' + - 'app/models/subscription.rb' + - 'app/uploaders/picture_uploader.rb' + - 'spec/models/ability_spec.rb' + - 'spec/models/program_spec.rb' # Offense count: 2 # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist. @@ -455,10 +689,20 @@ Style/PercentLiteralDelimiters: # NameWhitelist: is_a? Style/PredicateName: Exclude: + - 'spec/**/*' - 'app/models/comment.rb' - 'app/models/contact.rb' +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: short, verbose +Style/PreferredHashMethods: + Exclude: + - 'lib/tasks/migrate_config.rake' + # Offense count: 6 +# Cop supports --auto-correct. # Configuration parameters: SupportedStyles. # SupportedStyles: compact, exploded Style/RaiseArgs: @@ -476,7 +720,7 @@ Style/RedundantParentheses: Exclude: - 'app/controllers/admin/base_controller.rb' -# Offense count: 4 +# Offense count: 10 # Cop supports --auto-correct. # Configuration parameters: AllowMultipleReturnValues. Style/RedundantReturn: @@ -499,12 +743,13 @@ Style/SelfAssignment: - 'db/migrate/20141104131625_generate_username.rb' - 'spec/support/save_feature_failures.rb' -# Offense count: 1 +# Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: only_raise, only_fail, semantic Style/SignalException: Exclude: + - 'lib/tasks/user.rake' - 'spec/support/flash.rb' # Offense count: 1 @@ -516,33 +761,46 @@ Style/SingleLineMethods: # Offense count: 1 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleInsidePipes, SupportedStyles. -# SupportedStyles: space, no_space +Style/SpaceAfterComma: + Exclude: + - 'lib/tasks/data_demo.rake' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleInsidePipes, SupportedStylesInsidePipes. +# SupportedStylesInsidePipes: space, no_space Style/SpaceAroundBlockParameters: Exclude: - 'app/helpers/application_helper.rb' -# Offense count: 4 +# Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: space, no_space Style/SpaceAroundEqualsInParameterDefault: - Enabled: false + Exclude: + - 'app/helpers/application_helper.rb' + - 'app/models/event.rb' -# Offense count: 223 +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment. +Style/SpaceAroundOperators: + Exclude: + - 'lib/tasks/data.rake' + +# Offense count: 315 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: space, no_space Style/SpaceBeforeBlockBraces: Enabled: false -# Offense count: 2 +# Offense count: 1 # Cop supports --auto-correct. -# Configuration parameters: AllowForAlignment. -Style/SpaceBeforeFirstArg: +Style/SpaceBeforeComma: Exclude: - - 'app/controllers/conference_registrations_controller.rb' - - 'spec/factories/splashpages.rb' + - 'lib/tasks/data_demo.rake' # Offense count: 1 # Cop supports --auto-correct. @@ -550,42 +808,94 @@ Style/SpaceBeforeSemicolon: Exclude: - 'Guardfile' -# Offense count: 36 +# Offense count: 2 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. -# SupportedStyles: space, no_space -Style/SpaceInsideBlockBraces: - Enabled: false +Style/SpaceInsideArrayPercentLiteral: + Exclude: + - 'spec/models/ability_spec.rb' -# Offense count: 17 +# Offense count: 62 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters. +# SupportedStyles: space, no_space +# SupportedStylesForEmptyBraces: space, no_space +Style/SpaceInsideBlockBraces: + Exclude: + - 'app/controllers/admin/comments_controller.rb' + - 'app/controllers/admin/events_controller.rb' + - 'app/controllers/admin/questions_controller.rb' + - 'app/helpers/application_helper.rb' + - 'app/models/program.rb' + - 'app/models/ticket.rb' + - 'app/models/user.rb' + - 'lib/tasks/events_registrations.rake' + - 'spec/controllers/admin/event_schedules_controller_spec.rb' + - 'spec/controllers/admin/schedules_controller_spec.rb' + - 'spec/features/splashpage_spec.rb' + - 'spec/models/ability_spec.rb' + - 'spec/models/user_spec.rb' + +# Offense count: 5 # Cop supports --auto-correct. Style/SpaceInsideBrackets: Exclude: - - 'app/controllers/admin/schedules_controller.rb' - 'app/models/conference.rb' - 'app/models/user.rb' - - 'spec/controllers/admin/conferences_controller_spec.rb' - - 'spec/views/admin/events/index.html.haml_spec.rb' -# Offense count: 14 +# Offense count: 25 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles. -# SupportedStyles: space, no_space +# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces. +# SupportedStyles: space, no_space, compact +# SupportedStylesForEmptyBraces: space, no_space Style/SpaceInsideHashLiteralBraces: - Enabled: false + Exclude: + - 'app/controllers/admin/conferences_controller.rb' + - 'app/controllers/api/v1/speakers_controller.rb' + - 'app/models/ability.rb' + - 'app/models/conference.rb' + - 'app/models/event_type.rb' + - 'app/models/user.rb' + - 'spec/models/event_spec.rb' + - 'spec/models/payment_spec.rb' -# Offense count: 1 +# Offense count: 2 +# Cop supports --auto-correct. +Style/SpaceInsidePercentLiteralDelimiters: + Exclude: + - 'Gemfile' + +# Offense count: 16 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline. +# SupportedStyles: single_quotes, double_quotes +Style/StringLiterals: + Exclude: + - 'Gemfile' + - 'Vagrantfile' + - 'lib/tasks/dump_db.rake' + - 'lib/tasks/events_registrations.rake' + - 'lib/tasks/factory_girl.rake' + - 'lib/tasks/user.rake' + +# Offense count: 6 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: space, no_space -Style/SpaceInsideStringInterpolation: +# SupportedStyles: single_quotes, double_quotes +Style/StringLiteralsInInterpolation: Exclude: - - 'app/models/user.rb' + - 'lib/tasks/dump_db.rake' + +# Offense count: 59 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: percent, brackets +Style/SymbolArray: + Enabled: false # Offense count: 10 # Cop supports --auto-correct. # Configuration parameters: IgnoredMethods. -# IgnoredMethods: respond_to +# IgnoredMethods: respond_to, define_method Style/SymbolProc: Exclude: - 'app/controllers/admin/comments_controller.rb' @@ -596,29 +906,54 @@ Style/SymbolProc: - 'spec/controllers/admin/conferences_controller_spec.rb' - 'spec/support/flash.rb' - -# Offense count: 26 +# Offense count: 2 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles. -# SupportedStyles: comma, consistent_comma, no_comma +# Configuration parameters: EnforcedStyle, SupportedStyles, AllowSafeAssignment. +# SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex +Style/TernaryParentheses: + Exclude: + - 'app/helpers/application_helper.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: final_newline, final_blank_line +Style/TrailingBlankLines: + Exclude: + - 'lib/tasks/event_attatchments.rake' + - 'lib/tasks/roles.rake' + +# Offense count: 23 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline. +# SupportedStylesForMultiline: comma, consistent_comma, no_comma Style/TrailingCommaInLiteral: Exclude: - 'Guardfile' - - 'app/models/target.rb' - 'db/migrate/20140701123203_add_events_per_week_to_conference.rb' - - 'spec/controllers/admin/conferences_controller_spec.rb' - 'spec/models/conference_spec.rb' -# Offense count: 8 +# Offense count: 1 +# Cop supports --auto-correct. +Style/TrailingWhitespace: + Exclude: + - 'Gemfile' + +# Offense count: 3 # Cop supports --auto-correct. Style/UnneededInterpolation: Exclude: - - 'app/controllers/admin/events_controller.rb' - 'app/helpers/application_helper.rb' - 'spec/controllers/admin/conferences_controller_spec.rb' - - 'spec/views/admin/volunteers/index.html.haml_spec.rb' -# Offense count: 3 +# Offense count: 2 +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: snake_case, normalcase, non_integer +Style/VariableNumber: + Exclude: + - 'spec/models/ticket_purchase_spec.rb' + +# Offense count: 6 # Cop supports --auto-correct. # Configuration parameters: SupportedStyles, WordRegex. # SupportedStyles: percent, brackets From aaeca108a8ea1436863e66a157dd31215dc28a99 Mon Sep 17 00:00:00 2001 From: Agrim Mittal Date: Thu, 13 Apr 2017 17:38:38 +0530 Subject: [PATCH 3/3] Add missed offenses to rubocop_todo A known rubocop bug, solved by adding files manually Closes #1450 --- .rubocop_todo.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index c2122773..ccc0aca3 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -321,7 +321,12 @@ Style/CommentIndentation: # SupportedStyles: assign_to_condition, assign_inside_condition Style/ConditionalAssignment: Exclude: + - 'app/controllers/admin/volunteers_controller.rb' + - 'app/controllers/conference_registrations_controller.rb' - 'app/helpers/application_helper.rb' + - 'app/models/conference.rb' + - 'app/models/ticket_purchase.rb' + - 'app/models/user.rb' - 'db/migrate/20140610165551_migrate_data_person_to_user.rb' - 'db/migrate/20140820124117_undo_wrong_migration20140801080705_add_users_to_events.rb'