From 8b9e4d12885029b620aaaa55403e4798348fe11b Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Fri, 13 Aug 2021 10:40:45 +0000 Subject: [PATCH] Update rubocop-rspec to version 2.4.0 --- .haml-lint_todo.yml | 587 +++----------------------------------------- .rubocop.yml | 14 +- .rubocop_todo.yml | 542 ++++++++++++++++++++++++++++------------ Gemfile | 3 +- Gemfile.lock | 33 ++- 5 files changed, 456 insertions(+), 723 deletions(-) diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index 7bcb33d4..7b325440 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `haml-lint --auto-gen-config` -# on 2018-09-08 04:09:29 +0200 using Haml-Lint version 0.24.0. +# on 2021-08-13 13:00:39 +0000 using Haml-Lint version 0.28.0. # The point is for the user to remove these configuration records # one by one as the lints are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -8,245 +8,9 @@ linters: - # Offense count: 1167 + # Offense count: 1141 RuboCop: - exclude: - - "app/views/admin/booths/_all_booths.csv.haml" - - "app/views/admin/booths/_change_state_dropdown.html.haml" - - "app/views/admin/booths/_confirmed_booths.csv.haml" - - "app/views/admin/booths/booths.csv.haml" - - "app/views/admin/booths/edit.html.haml" - - "app/views/admin/booths/index.html.haml" - - "app/views/admin/booths/new.html.haml" - - "app/views/admin/booths/show.html.haml" - - "app/views/admin/cfps/_booths_cfp.html.haml" - - "app/views/admin/cfps/_events_cfp.html.haml" - - "app/views/admin/cfps/_form.html.haml" - - "app/views/admin/cfps/_tracks_cfp.html.haml" - - "app/views/admin/cfps/edit.haml" - - "app/views/admin/cfps/index.html.haml" - - "app/views/admin/cfps/new.haml" - - "app/views/admin/cfps/show.html.haml" - - "app/views/admin/comments/_all_comments.html.haml" - - "app/views/admin/comments/_posted_comments.html.haml" - - "app/views/admin/comments/_unread_comments.html.haml" - - "app/views/admin/comments/index.html.haml" - - "app/views/admin/commercials/index.html.haml" - - "app/views/admin/conferences/_doughnut_chart.html.haml" - - "app/views/admin/conferences/_line_chart.html.haml" - - "app/views/admin/conferences/_recent_registrations.html.haml" - - "app/views/admin/conferences/_recent_submissions.html.haml" - - "app/views/admin/conferences/_recent_users.html.haml" - - "app/views/admin/conferences/_todo_list.html.haml" - - "app/views/admin/conferences/_top_submitter.html.haml" - - "app/views/admin/conferences/edit.html.haml" - - "app/views/admin/conferences/index.html.haml" - - "app/views/admin/conferences/new.html.haml" - - "app/views/admin/conferences/show.html.haml" - - "app/views/admin/contacts/edit.html.haml" - - "app/views/admin/difficulty_levels/_form.html.haml" - - "app/views/admin/difficulty_levels/index.html.haml" - - "app/views/admin/emails/_help.html.haml" - - "app/views/admin/emails/index.html.haml" - - "app/views/admin/event_types/_form.html.haml" - - "app/views/admin/event_types/index.html.haml" - - "app/views/admin/events/_all_events.csv.haml" - - "app/views/admin/events/_all_with_comments.csv.haml" - - "app/views/admin/events/_confirmed_events.csv.haml" - - "app/views/admin/events/_datatable_row.haml" - - "app/views/admin/events/_datatable_row_rating.haml" - - "app/views/admin/events/_export_menu.haml" - - "app/views/admin/events/_form.html.haml" - - "app/views/admin/events/_nested_comments.html.haml" - - "app/views/admin/events/_proposal.html.haml" - - "app/views/admin/events/_user_fields.html.haml" - - "app/views/admin/events/_voting.html.haml" - - "app/views/admin/events/edit.html.haml" - - "app/views/admin/events/events.csv.haml" - - "app/views/admin/events/index.html.haml" - - "app/views/admin/events/registrations.html.haml" - - "app/views/admin/events/show.html.haml" - - "app/views/admin/lodgings/_form.html.haml" - - "app/views/admin/lodgings/index.html.haml" - - "app/views/admin/organizations/_form.html.haml" - - "app/views/admin/organizations/_users_with_org_admin_role.haml" - - "app/views/admin/organizations/index.html.haml" - - "app/views/admin/organizations/show_org_admins.haml" - - "app/views/admin/physical_tickets/_physical_ticket.html.haml" - - "app/views/admin/physical_tickets/index.html.haml" - - "app/views/admin/programs/_form.html.haml" - - "app/views/admin/programs/show.html.haml" - - "app/views/admin/questions/_answer_fields.html.haml" - - "app/views/admin/questions/_form.html.haml" - - "app/views/admin/questions/_questions.html.haml" - - "app/views/admin/questions/edit.html.haml" - - "app/views/admin/questions/index.html.haml" - - "app/views/admin/questions/show.html.haml" - - "app/views/admin/registration_periods/_form.html.haml" - - "app/views/admin/registrations/_questions.html.haml" - - "app/views/admin/registrations/edit.html.haml" - - "app/views/admin/registrations/index.csv.haml" - - "app/views/admin/registrations/index.html.haml" - - "app/views/admin/reports/_all_events.html.haml" - - "app/views/admin/reports/_events_with_requirements.html.haml" - - "app/views/admin/reports/_events_without_commercials.html.haml" - - "app/views/admin/reports/_missing_speakers.html.haml" - - "app/views/admin/reports/index.html.haml" - - "app/views/admin/resources/_form.html.haml" - - "app/views/admin/resources/index.html.haml" - - "app/views/admin/resources/new.html.haml" - - "app/views/admin/resources/show.html.haml" - - "app/views/admin/roles/_form.html.haml" - - "app/views/admin/roles/_users.html.haml" - - "app/views/admin/roles/index.html.haml" - - "app/views/admin/roles/show.html.haml" - - "app/views/admin/rooms/_form.html.haml" - - "app/views/admin/rooms/index.html.haml" - - "app/views/admin/schedules/_day_tab.html.haml" - - "app/views/admin/schedules/_event.html.haml" - - "app/views/admin/schedules/_form.html.haml" - - "app/views/admin/schedules/index.html.haml" - - "app/views/admin/schedules/show.html.haml" - - "app/views/admin/splashpages/_form.html.haml" - - "app/views/admin/splashpages/show.html.haml" - - "app/views/admin/sponsors/_form.html.haml" - - "app/views/admin/sponsors/index.html.haml" - - "app/views/admin/sponsorship_levels/_form.html.haml" - - "app/views/admin/sponsorship_levels/index.html.haml" - - "app/views/admin/survey_questions/_form.html.haml" - - "app/views/admin/survey_questions/edit.html.haml" - - "app/views/admin/surveys/_form.html.haml" - - "app/views/admin/surveys/_survey_question.html.haml" - - "app/views/admin/surveys/_survey_question_title.html.haml" - - "app/views/admin/surveys/_survey_replies.html.haml" - - "app/views/admin/surveys/_survey_stats.html.haml" - - "app/views/admin/surveys/edit.html.haml" - - "app/views/admin/surveys/index.html.haml" - - "app/views/admin/surveys/new.html.haml" - - "app/views/admin/surveys/show.html.haml" - - "app/views/admin/tickets/_form.html.haml" - - "app/views/admin/tickets/index.html.haml" - - "app/views/admin/tickets/show.html.haml" - - "app/views/admin/tracks/_all_tracks.csv.haml" - - "app/views/admin/tracks/_change_state_dropdown.html.haml" - - "app/views/admin/tracks/_confirmed_tracks.csv.haml" - - "app/views/admin/tracks/_form.html.haml" - - "app/views/admin/tracks/index.html.haml" - - "app/views/admin/tracks/show.html.haml" - - "app/views/admin/tracks/tracks.csv.haml" - - "app/views/admin/users/_event_registrations.html.haml" - - "app/views/admin/users/_form.html.haml" - - "app/views/admin/users/_submissions.html.haml" - - "app/views/admin/users/index.html.haml" - - "app/views/admin/users/show.html.haml" - - "app/views/admin/venues/_form.html.haml" - - "app/views/admin/venues/show.html.haml" - - "app/views/admin/versions/_object_desc_and_link.html.haml" - - "app/views/admin/versions/index.html.haml" - - "app/views/admin/volunteers/_volunteers_table.html.haml" - - "app/views/admin/volunteers/index.html.haml" - - "app/views/admin/volunteers/show.html.haml" - - "app/views/application/document.haml" - - "app/views/application/edit.html.haml" - - "app/views/application/new.html.haml" - - "app/views/booths/_form.html.haml" - - "app/views/booths/edit.html.haml" - - "app/views/booths/index.html.haml" - - "app/views/booths/new.html.haml" - - "app/views/booths/show.html.haml" - - "app/views/commercials/edit.html.haml" - - "app/views/commercials/new.html.haml" - - "app/views/conference_registrations/_form.html.haml" - - "app/views/conference_registrations/_questions.html.haml" - - "app/views/conference_registrations/_registration_info.html.haml" - - "app/views/conference_registrations/_ticket.html.haml" - - "app/views/conference_registrations/_tickets.html.haml" - - "app/views/conference_registrations/_volunteer.html.haml" - - "app/views/conference_registrations/show.html.haml" - - "app/views/conferences/_booths.haml" - - "app/views/conferences/_call_for_booths.haml" - - "app/views/conferences/_call_for_content.haml" - - "app/views/conferences/_call_for_papers.haml" - - "app/views/conferences/_call_for_tracks.haml" - - "app/views/conferences/_code_of_conduct.haml" - - "app/views/conferences/_conference_details.html.haml" - - "app/views/conferences/_footer.haml" - - "app/views/conferences/_gallery.html.haml" - - "app/views/conferences/_header.haml" - - "app/views/conferences/_highlights.haml" - - "app/views/conferences/_lodging.haml" - - "app/views/conferences/_modal_description.haml" - - "app/views/conferences/_program.haml" - - "app/views/conferences/_registration.haml" - - "app/views/conferences/_social_media.haml" - - "app/views/conferences/_sponsors.haml" - - "app/views/conferences/_tickets.haml" - - "app/views/conferences/_tracks.haml" - - "app/views/conferences/_venue.haml" - - "app/views/conferences/_venue_map.haml" - - "app/views/conferences/_venue_map_marker.haml" - - "app/views/conferences/index.html.haml" - - "app/views/conferences/show.html.haml" - - "app/views/devise/confirmations/new.html.haml" - - "app/views/devise/ichain_sessions/new.html.haml" - - "app/views/devise/ichain_sessions/new_test.html.haml" - - "app/views/devise/passwords/edit.html.haml" - - "app/views/devise/passwords/new.html.haml" - - "app/views/devise/registrations/_volunteeruser.html.haml" - - "app/views/devise/registrations/edit.html.haml" - - "app/views/devise/registrations/new.html.haml" - - "app/views/devise/sessions/new.html.haml" - - "app/views/devise/shared/_help.html.haml" - - "app/views/devise/shared/_links.html.haml" - - "app/views/devise/shared/_openid.html.haml" - - "app/views/devise/shared/_openid_links.html.haml" - - "app/views/devise/shared/_sign_in_form_embedded.html.haml" - - "app/views/devise/shared/_sign_up_form_embedded.html.haml" - - "app/views/layouts/_admin.html.haml" - - "app/views/layouts/_admin_sidebar.html.haml" - - "app/views/layouts/_admin_sidebar_index.html.haml" - - "app/views/layouts/_messages.html.haml" - - "app/views/layouts/_navigation.html.haml" - - "app/views/layouts/_user_menu.html.haml" - - "app/views/layouts/application.html.haml" - - "app/views/organizations/index.html.haml" - - "app/views/payments/_payment.html.haml" - - "app/views/payments/new.html.haml" - - "app/views/physical_tickets/index.html.haml" - - "app/views/physical_tickets/show.html.haml" - - "app/views/proposals/_encouragement_text.html.haml" - - "app/views/proposals/_form.html.haml" - - "app/views/proposals/_proposal_form.html.haml" - - "app/views/proposals/_tooltip.html.haml" - - "app/views/proposals/edit.html.haml" - - "app/views/proposals/index.html.haml" - - "app/views/proposals/new.html.haml" - - "app/views/proposals/registrations.html.haml" - - "app/views/proposals/show.html.haml" - - "app/views/schedules/_carousel.html.haml" - - "app/views/schedules/_event.html.haml" - - "app/views/schedules/_schedule.html.haml" - - "app/views/schedules/_schedule_item.html.haml" - - "app/views/schedules/_schedule_tabs.html.haml" - - "app/views/schedules/app.html.haml" - - "app/views/schedules/events.html.haml" - - "app/views/schedules/show.html.haml" - - "app/views/schedules/show.xml.haml" - - "app/views/shared/_big_statistic.haml" - - "app/views/shared/_changelog_actions.haml" - - "app/views/shared/_dynamic_association.html.haml" - - "app/views/shared/_media_item.html.haml" - - "app/views/shared/_media_items.html.haml" - - "app/views/shared/_object_changes.html.haml" - - "app/views/surveys/_list.html.haml" - - "app/views/surveys/index.html.haml" - - "app/views/surveys/show.html.haml" - - "app/views/ticket_purchases/index.html.haml" - - "app/views/tracks/_form.html.haml" - - "app/views/tracks/index.html.haml" - - "app/views/tracks/show.html.haml" - - "app/views/users/edit.html.haml" - - "app/views/users/show.html.haml" + enabled: false # Offense count: 24 ConsecutiveSilentScripts: @@ -258,220 +22,31 @@ linters: - "app/views/booths/index.html.haml" - "app/views/schedules/_carousel.html.haml" - # Offense count: 230 - InstanceVariables: - exclude: - - "app/views/admin/booths/_change_state_dropdown.html.haml" - - "app/views/admin/conferences/_todo_list.html.haml" - - "app/views/admin/difficulty_levels/_form.html.haml" - - "app/views/admin/event_types/_form.html.haml" - - "app/views/admin/events/_form.html.haml" - - "app/views/admin/events/_proposal.html.haml" - - "app/views/admin/lodgings/_form.html.haml" - - "app/views/admin/organizations/_form.html.haml" - - "app/views/admin/questions/_questions.html.haml" - - "app/views/admin/registration_periods/_form.html.haml" - - "app/views/admin/reports/_all_events.html.haml" - - "app/views/admin/reports/_events_with_requirements.html.haml" - - "app/views/admin/reports/_events_without_commercials.html.haml" - - "app/views/admin/reports/_missing_speakers.html.haml" - - "app/views/admin/roles/_form.html.haml" - - "app/views/admin/roles/_users.html.haml" - - "app/views/admin/rooms/_form.html.haml" - - "app/views/admin/schedules/_day_tab.html.haml" - - "app/views/admin/schedules/_event.html.haml" - - "app/views/admin/schedules/_form.html.haml" - - "app/views/admin/splashpages/_form.html.haml" - - "app/views/admin/sponsors/_form.html.haml" - - "app/views/admin/sponsorship_levels/_form.html.haml" - - "app/views/admin/survey_questions/_form.html.haml" - - "app/views/admin/surveys/_form.html.haml" - - "app/views/admin/surveys/_survey_stats.html.haml" - - "app/views/admin/tickets/_form.html.haml" - - "app/views/admin/tracks/_change_state_dropdown.html.haml" - - "app/views/admin/tracks/_form.html.haml" - - "app/views/admin/users/_form.html.haml" - - "app/views/admin/users/_submissions.html.haml" - - "app/views/admin/venues/_form.html.haml" - - "app/views/conference_registrations/_form.html.haml" - - "app/views/conference_registrations/_registration_info.html.haml" - - "app/views/conference_registrations/_volunteer.html.haml" - - "app/views/layouts/_admin_sidebar.html.haml" - - "app/views/layouts/_user_menu.html.haml" - - "app/views/payments/_payment.html.haml" - - "app/views/proposals/_encouragement_text.html.haml" - - "app/views/proposals/_form.html.haml" - - "app/views/proposals/_proposal_form.html.haml" - - "app/views/schedules/_carousel.html.haml" - - "app/views/schedules/_event.html.haml" - - "app/views/schedules/_schedule.html.haml" - - "app/views/schedules/_schedule_item.html.haml" - - "app/views/schedules/_schedule_tabs.html.haml" - - "app/views/tracks/_form.html.haml" - - # Offense count: 1074 + # Offense count: 981 LineLength: - max: 150 + enabled: false + + # Offense count: 206 + InstanceVariables: + enabled: false + + # Offense count: 12 + ViewLength: exclude: - - "app/views/admin/booths/_change_state_dropdown.html.haml" - "app/views/admin/booths/index.html.haml" - - "app/views/admin/booths/show.html.haml" - - "app/views/admin/comments/_all_comments.html.haml" - - "app/views/admin/comments/_posted_comments.html.haml" - - "app/views/admin/comments/_unread_comments.html.haml" - - "app/views/admin/commercials/index.html.haml" - - "app/views/admin/conferences/_doughnut_chart.html.haml" - - "app/views/admin/conferences/_line_chart.html.haml" - - "app/views/admin/conferences/_recent_registrations.html.haml" - - "app/views/admin/conferences/_recent_submissions.html.haml" - - "app/views/admin/conferences/_recent_users.html.haml" - - "app/views/admin/conferences/_todo_list.html.haml" - - "app/views/admin/conferences/_top_submitter.html.haml" - - "app/views/admin/conferences/edit.html.haml" - - "app/views/admin/conferences/index.html.haml" - - "app/views/admin/conferences/new.html.haml" - "app/views/admin/conferences/show.html.haml" - - "app/views/admin/contacts/edit.html.haml" - - "app/views/admin/difficulty_levels/_form.html.haml" - - "app/views/admin/difficulty_levels/index.html.haml" - - "app/views/admin/emails/_help.html.haml" - "app/views/admin/emails/index.html.haml" - - "app/views/admin/event_types/_form.html.haml" - - "app/views/admin/event_types/index.html.haml" - - "app/views/admin/events/_all_events.csv.haml" - - "app/views/admin/events/_all_with_comments.csv.haml" - - "app/views/admin/events/_confirmed_events.csv.haml" - - "app/views/admin/events/_nested_comments.html.haml" - "app/views/admin/events/_proposal.html.haml" - "app/views/admin/events/index.html.haml" - - "app/views/admin/events/registrations.html.haml" - - "app/views/admin/events/show.html.haml" - - "app/views/admin/lodgings/_form.html.haml" - - "app/views/admin/lodgings/index.html.haml" - - "app/views/admin/organizations/_form.html.haml" - - "app/views/admin/organizations/index.html.haml" - - "app/views/admin/programs/_form.html.haml" - - "app/views/admin/programs/show.html.haml" - - "app/views/admin/questions/_form.html.haml" - - "app/views/admin/questions/_questions.html.haml" - - "app/views/admin/questions/edit.html.haml" - - "app/views/admin/questions/index.html.haml" - - "app/views/admin/questions/show.html.haml" - - "app/views/admin/registration_periods/_form.html.haml" - - "app/views/admin/registrations/edit.html.haml" - - "app/views/admin/registrations/index.html.haml" - - "app/views/admin/reports/_all_events.html.haml" - - "app/views/admin/reports/_events_with_requirements.html.haml" - - "app/views/admin/reports/_events_without_commercials.html.haml" - - "app/views/admin/reports/_missing_speakers.html.haml" - - "app/views/admin/resources/_form.html.haml" - - "app/views/admin/resources/index.html.haml" - - "app/views/admin/resources/show.html.haml" - - "app/views/admin/roles/_users.html.haml" - - "app/views/admin/roles/index.html.haml" - - "app/views/admin/roles/show.html.haml" - - "app/views/admin/rooms/_form.html.haml" - - "app/views/admin/rooms/index.html.haml" - - "app/views/admin/schedules/_day_tab.html.haml" - - "app/views/admin/schedules/_event.html.haml" - - "app/views/admin/schedules/_form.html.haml" - - "app/views/admin/schedules/index.html.haml" - - "app/views/admin/schedules/show.html.haml" - - "app/views/admin/splashpages/_form.html.haml" - - "app/views/admin/splashpages/show.html.haml" - - "app/views/admin/sponsors/_form.html.haml" - - "app/views/admin/sponsors/index.html.haml" - - "app/views/admin/sponsorship_levels/_form.html.haml" - - "app/views/admin/sponsorship_levels/index.html.haml" - - "app/views/admin/survey_questions/_form.html.haml" - - "app/views/admin/surveys/_form.html.haml" - - "app/views/admin/surveys/_survey_question.html.haml" - - "app/views/admin/surveys/_survey_question_title.html.haml" - - "app/views/admin/surveys/_survey_replies.html.haml" - - "app/views/admin/surveys/_survey_stats.html.haml" - - "app/views/admin/surveys/index.html.haml" - - "app/views/admin/surveys/show.html.haml" - - "app/views/admin/tickets/_form.html.haml" - - "app/views/admin/tickets/index.html.haml" - - "app/views/admin/tickets/show.html.haml" - - "app/views/admin/tracks/_form.html.haml" - "app/views/admin/tracks/index.html.haml" - "app/views/admin/tracks/show.html.haml" - - "app/views/admin/users/_event_registrations.html.haml" - - "app/views/admin/users/_form.html.haml" - - "app/views/admin/users/_submissions.html.haml" - - "app/views/admin/users/index.html.haml" - - "app/views/admin/users/show.html.haml" - - "app/views/admin/venues/_form.html.haml" - - "app/views/admin/venues/show.html.haml" - "app/views/admin/versions/_object_desc_and_link.html.haml" - - "app/views/admin/versions/index.html.haml" - - "app/views/admin/volunteers/index.html.haml" - - "app/views/booths/_form.html.haml" - - "app/views/booths/index.html.haml" - - "app/views/booths/show.html.haml" - - "app/views/commercials/edit.html.haml" - - "app/views/commercials/new.html.haml" - - "app/views/conference_registrations/_form.html.haml" - - "app/views/conference_registrations/_questions.html.haml" - - "app/views/conference_registrations/_registration_info.html.haml" - - "app/views/conference_registrations/_volunteer.html.haml" - "app/views/conference_registrations/show.html.haml" - - "app/views/conferences/_conference_details.html.haml" - - "app/views/conferences/_gallery.html.haml" - - "app/views/conferences/index.html.haml" - - "app/views/devise/confirmations/new.html.haml" - - "app/views/devise/ichain_sessions/new.html.haml" - - "app/views/devise/ichain_sessions/new_test.html.haml" - - "app/views/devise/passwords/edit.html.haml" - - "app/views/devise/passwords/new.html.haml" - - "app/views/devise/registrations/_volunteeruser.html.haml" - - "app/views/devise/registrations/edit.html.haml" - - "app/views/devise/registrations/new.html.haml" - - "app/views/devise/sessions/new.html.haml" - - "app/views/devise/shared/_help.html.haml" - - "app/views/devise/shared/_links.html.haml" - - "app/views/devise/shared/_openid_links.html.haml" - - "app/views/devise/shared/_sign_in_form_embedded.html.haml" - - "app/views/devise/shared/_sign_up_form_embedded.html.haml" - "app/views/layouts/_admin_sidebar.html.haml" - - "app/views/layouts/_admin_sidebar_index.html.haml" - - "app/views/layouts/_messages.html.haml" - - "app/views/layouts/_navigation.html.haml" - - "app/views/layouts/_user_menu.html.haml" - - "app/views/layouts/application.html.haml" - - "app/views/organizations/index.html.haml" - - "app/views/payments/_payment.html.haml" - - "app/views/proposals/_form.html.haml" - - "app/views/proposals/_proposal_form.html.haml" - - "app/views/proposals/_tooltip.html.haml" - "app/views/proposals/index.html.haml" - - "app/views/proposals/new.html.haml" - - "app/views/proposals/registrations.html.haml" - "app/views/proposals/show.html.haml" - - "app/views/schedules/_carousel.html.haml" - - "app/views/schedules/_event.html.haml" - - "app/views/schedules/_schedule.html.haml" - - "app/views/schedules/_schedule_item.html.haml" - - "app/views/schedules/_schedule_tabs.html.haml" - - "app/views/schedules/events.html.haml" - - "app/views/schedules/show.html.haml" - - "app/views/schedules/show.xml.haml" - - "app/views/shared/_changelog_actions.haml" - - "app/views/shared/_dynamic_association.html.haml" - - "app/views/shared/_media_item.html.haml" - - "app/views/shared/_media_items.html.haml" - - "app/views/shared/_object_changes.html.haml" - - "app/views/surveys/_list.html.haml" - - "app/views/surveys/index.html.haml" - - "app/views/surveys/show.html.haml" - - "app/views/tracks/_form.html.haml" - - "app/views/tracks/index.html.haml" - - "app/views/tracks/show.html.haml" - - "app/views/users/edit.html.haml" - - "app/views/users/show.html.haml" - # Offense count: 34 + # Offense count: 28 IdNames: exclude: - "app/views/admin/comments/index.html.haml" @@ -487,77 +62,20 @@ linters: - "app/views/admin/users/show.html.haml" - "app/views/users/edit.html.haml" - # Offense count: 4 + # Offense count: 38 + InlineStyles: + enabled: false + + # Offense count: 3 UnnecessaryInterpolation: exclude: - - "app/views/admin/conferences/_doughnut_chart.html.haml" - "app/views/admin/conferences/_recent_submissions.html.haml" - "app/views/proposals/_proposal_form.html.haml" - "app/views/proposals/new.html.haml" - # Offense count: 23 - UnnecessaryStringOutput: - exclude: - - "app/views/admin/event_types/index.html.haml" - - "app/views/admin/events/show.html.haml" - - "app/views/admin/users/_submissions.html.haml" - - "app/views/admin/venues/show.html.haml" - - "app/views/admin/versions/_object_desc_and_link.html.haml" - - "app/views/admin/volunteers/show.html.haml" - - "app/views/conference_registrations/show.html.haml" - - "app/views/conferences/_conference_details.html.haml" - - "app/views/proposals/_encouragement_text.html.haml" - - "app/views/proposals/_form.html.haml" - - "app/views/users/edit.html.haml" - - "app/views/users/show.html.haml" - - # Offense count: 276 + # Offense count: 262 SpaceInsideHashAttributes: - exclude: - - "app/views/admin/conferences/_todo_list.html.haml" - - "app/views/admin/emails/index.html.haml" - - "app/views/admin/questions/_form.html.haml" - - "app/views/admin/questions/index.html.haml" - - "app/views/admin/registrations/index.html.haml" - - "app/views/admin/reports/_all_events.html.haml" - - "app/views/admin/reports/index.html.haml" - - "app/views/admin/schedules/_day_tab.html.haml" - - "app/views/admin/schedules/_event.html.haml" - - "app/views/admin/schedules/index.html.haml" - - "app/views/admin/schedules/show.html.haml" - - "app/views/admin/sponsorship_levels/index.html.haml" - - "app/views/admin/tickets/show.html.haml" - - "app/views/admin/tracks/index.html.haml" - - "app/views/admin/users/show.html.haml" - - "app/views/admin/venues/_form.html.haml" - - "app/views/admin/venues/show.html.haml" - - "app/views/conference_registrations/_form.html.haml" - - "app/views/conference_registrations/_ticket.html.haml" - - "app/views/conference_registrations/_volunteer.html.haml" - - "app/views/conferences/index.html.haml" - - "app/views/devise/shared/_help.html.haml" - - "app/views/devise/shared/_openid_links.html.haml" - - "app/views/devise/shared/_sign_in_form_embedded.html.haml" - - "app/views/layouts/_admin_sidebar.html.haml" - - "app/views/layouts/_admin_sidebar_index.html.haml" - - "app/views/layouts/_messages.html.haml" - - "app/views/layouts/_navigation.html.haml" - - "app/views/layouts/application.html.haml" - - "app/views/payments/_payment.html.haml" - - "app/views/proposals/_form.html.haml" - - "app/views/proposals/_tooltip.html.haml" - - "app/views/proposals/index.html.haml" - - "app/views/proposals/new.html.haml" - - "app/views/proposals/show.html.haml" - - "app/views/schedules/_carousel.html.haml" - - "app/views/schedules/_schedule_item.html.haml" - - "app/views/shared/_changelog_actions.haml" - - "app/views/shared/_dynamic_association.html.haml" - - "app/views/shared/_media_item.html.haml" - - "app/views/shared/_media_items.html.haml" - - "app/views/tickets/_ticket.html.haml" - - "app/views/tracks/index.html.haml" - - "app/views/tracks/show.html.haml" + enabled: false # Offense count: 24 ClassesBeforeIds: @@ -573,37 +91,25 @@ linters: - "app/views/layouts/_navigation.html.haml" - "app/views/proposals/_form.html.haml" - # Offense count: 38 - SpaceBeforeScript: + # Offense count: 19 + UnnecessaryStringOutput: exclude: - - "app/views/admin/events/_form.html.haml" - - "app/views/admin/registrations/index.html.haml" - - "app/views/admin/sponsors/_form.html.haml" - - "app/views/admin/tracks/_form.html.haml" - - "app/views/admin/tracks/show.html.haml" + - "app/views/admin/event_types/index.html.haml" + - "app/views/admin/events/show.html.haml" + - "app/views/admin/users/_submissions.html.haml" - "app/views/admin/venues/show.html.haml" - - "app/views/admin/versions/index.html.haml" - - "app/views/booths/index.html.haml" - - "app/views/conference_registrations/_form.html.haml" - - "app/views/conference_registrations/_ticket.html.haml" + - "app/views/admin/versions/_object_desc_and_link.html.haml" + - "app/views/admin/volunteers/show.html.haml" - "app/views/conference_registrations/show.html.haml" - - "app/views/conferences/index.html.haml" - - "app/views/layouts/_admin.html.haml" - - "app/views/layouts/_navigation.html.haml" - - "app/views/layouts/_user_menu.html.haml" - - "app/views/layouts/application.html.haml" + - "app/views/conferences/_conference_details.html.haml" - "app/views/proposals/_encouragement_text.html.haml" - - "app/views/proposals/new.html.haml" - - "app/views/proposals/registrations.html.haml" - - "app/views/proposals/show.html.haml" - - "app/views/schedules/events.html.haml" - - "app/views/schedules/show.xml.haml" + - "app/views/proposals/_form.html.haml" + - "app/views/users/edit.html.haml" + - "app/views/users/show.html.haml" - # Offense count: 2 - FinalNewline: - exclude: - - "app/views/admin/registrations/index.csv.haml" - - "app/views/layouts/_admin.html.haml" + # Offense count: 31 + SpaceBeforeScript: + enabled: false # Offense count: 1 ImplicitDiv: @@ -628,7 +134,7 @@ linters: - "app/views/layouts/_navigation.html.haml" - "app/views/schedules/events.html.haml" - # Offense count: 8 + # Offense count: 7 TrailingWhitespace: exclude: - "app/views/admin/volunteers/index.html.haml" @@ -637,24 +143,7 @@ linters: - "app/views/devise/passwords/new.html.haml" - "app/views/payments/new.html.haml" - - # Offense count: 13 - ViewLength: + # Offense count: 1 + FinalNewline: exclude: - - "app/views/admin/booths/index.html.haml" - - "app/views/admin/conferences/show.html.haml" - - "app/views/admin/emails/index.html.haml" - - "app/views/admin/events/_proposal.html.haml" - - "app/views/admin/events/index.html.haml" - - "app/views/admin/registrations/index.html.haml" - - "app/views/admin/tracks/index.html.haml" - - "app/views/admin/tracks/show.html.haml" - - "app/views/admin/versions/_object_desc_and_link.html.haml" - - "app/views/conference_registrations/show.html.haml" - - "app/views/layouts/_admin_sidebar.html.haml" - - "app/views/proposals/index.html.haml" - - "app/views/proposals/show.html.haml" - - # Offense count: 38 - InlineStyles: - enabled: false + - "app/views/layouts/_admin.html.haml" \ No newline at end of file diff --git a/.rubocop.yml b/.rubocop.yml index bdb72694..ff82c04c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -12,26 +12,22 @@ AllCops: MaxFilesInCache: 4000 Exclude: - db/schema.rb + NewCops: enable #################### Style ########################### +Layout/HashAlignment: + EnforcedHashRocketStyle: table + EnforcedColonStyle: table + ##################### Metrics ################################## ##################### Rails ################################## -Rails: - Enabled: true - ##################### RSpec ################################## -FactoryBot/AttributeDefinedStatically: - Enabled: true - RSpec/DescribeClass: Exclude: - "spec/views/**/*" - "spec/ability/*" -Layout/AlignHash: - EnforcedHashRocketStyle: table - EnforcedColonStyle: table diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 22d7366f..d0ba1ec4 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,34 +1,26 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2019-10-16 20:30:53 -0700 using RuboCop version 0.75.1. +# on 2021-08-13 12:49:18 UTC using RuboCop version 1.19.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: 351 +# Offense count: 1 # Cop supports --auto-correct. -Capybara/CurrentPathExpectation: +# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include. +# Include: **/*.gemfile, **/Gemfile, **/gems.rb +Bundler/OrderedGems: Exclude: - - 'spec/features/base_controller_spec.rb' - - 'spec/features/cfp_ability_spec.rb' - - 'spec/features/commercials_spec.rb' - - 'spec/features/conference_registration_spec.rb' - - 'spec/features/info_desk_ability_spec.rb' - - 'spec/features/organization_admin_ability_spec.rb' - - 'spec/features/organizer_ability_spec.rb' - - 'spec/features/proposals_spec.rb' - - 'spec/features/registration_periods_spec.rb' - - 'spec/features/splashpage_spec.rb' - - 'spec/features/ticket_purchases_spec.rb' - - 'spec/features/track_organizer_ability_spec.rb' - - 'spec/features/user_ability_spec.rb' + - 'Gemfile' -# Offense count: 161 +# Offense count: 5 # Cop supports --auto-correct. -# Configuration parameters: EnabledMethods. -Capybara/FeatureMethods: - Enabled: false +# Configuration parameters: IndentationWidth. +Layout/AssignmentIndentation: + Exclude: + - 'app/helpers/format_helper.rb' + - 'config/environments/development.rb' # Offense count: 4 # Cop supports --auto-correct. @@ -57,13 +49,20 @@ Layout/EmptyComment: Exclude: - 'config/initializers/formtastic.rb' +# Offense count: 3 +# Cop supports --auto-correct. +Layout/EmptyLineAfterGuardClause: + Exclude: + - 'app/controllers/subscriptions_controller.rb' + - 'app/models/program.rb' + # Offense count: 1 # Cop supports --auto-correct. Layout/EmptyLineAfterMagicComment: Exclude: - 'spec/models/conference_spec.rb' -# Offense count: 118 +# Offense count: 113 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: empty_lines, no_empty_lines @@ -76,7 +75,7 @@ Layout/EmptyLinesAroundExceptionHandlingKeywords: Exclude: - 'app/models/payment.rb' -# Offense count: 14 +# Offense count: 13 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment. Layout/ExtraSpacing: @@ -87,32 +86,23 @@ Layout/ExtraSpacing: - 'bin/rails' - 'config.ru' - 'config/environments/test.rb' - - 'config/initializers/airbrake.rb' - '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/models/conference_spec.rb' -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: IndentationWidth. -Layout/IndentAssignment: - Exclude: - - 'app/helpers/format_helper.rb' - - 'config/environments/development.rb' - # Offense count: 43 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses -Layout/IndentFirstArgument: +Layout/FirstArgumentIndentation: Enabled: false # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_brackets -Layout/IndentFirstArrayElement: +Layout/FirstArrayElementIndentation: Exclude: - 'app/models/conference.rb' @@ -120,7 +110,7 @@ Layout/IndentFirstArrayElement: # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_braces -Layout/IndentFirstHashElement: +Layout/FirstHashElementIndentation: Exclude: - 'app/models/user.rb' - 'config/routes.rb' @@ -135,6 +125,14 @@ Layout/IndentationConsistency: - 'app/controllers/users_controller.rb' - 'app/models/event.rb' +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: IndentationWidth, EnforcedStyle. +# SupportedStyles: spaces, tabs +Layout/IndentationStyle: + Exclude: + - 'app/controllers/admin/resources_controller.rb' + # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: Width, IgnoredPatterns. @@ -144,12 +142,19 @@ Layout/IndentationWidth: # Offense count: 4 # Cop supports --auto-correct. -# Configuration parameters: AllowDoxygenCommentStyle. +# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment. Layout/LeadingCommentSpace: Exclude: - 'Guardfile' - 'app/models/comment.rb' +# Offense count: 32 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: aligned, indented +Layout/LineEndStringConcatenationIndentation: + Enabled: false + # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. @@ -229,15 +234,24 @@ Layout/SpaceAroundKeyword: # Offense count: 4 # Cop supports --auto-correct. -# Configuration parameters: AllowForAlignment. +Layout/SpaceAroundMethodCallOperator: + Exclude: + - 'spec/features/cfp_ability_spec.rb' + - 'spec/features/organization_admin_ability_spec.rb' + - 'spec/features/organizer_ability_spec.rb' + - 'spec/models/program_spec.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator. +# SupportedStylesForExponentOperator: space, no_space Layout/SpaceAroundOperators: Exclude: - 'app/views/admin/events/_all_with_comments.xlsx.axlsx' - 'config/environments/test.rb' - - 'config/initializers/airbrake.rb' - 'lib/tasks/data.rake' -# Offense count: 138 +# Offense count: 139 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. # SupportedStyles: space, no_space @@ -257,6 +271,13 @@ Layout/SpaceBeforeComma: - 'app/views/admin/tracks/_confirmed_tracks.xlsx.axlsx' - 'lib/tasks/data_demo.rake' +# Offense count: 5 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment. +Layout/SpaceBeforeFirstArg: + Exclude: + - 'app/controllers/admin/booths_controller.rb' + # Offense count: 1 # Cop supports --auto-correct. Layout/SpaceBeforeSemicolon: @@ -329,32 +350,17 @@ Layout/SpaceInsidePercentLiteralDelimiters: Exclude: - 'Gemfile' -# Offense count: 4 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: space, no_space -Layout/SpaceInsideStringInterpolation: - Exclude: - - 'config/initializers/active_record_log_subscriber.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: IndentationWidth. -Layout/Tab: - Exclude: - - 'app/controllers/admin/resources_controller.rb' - -# Offense count: 3 +# Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: final_newline, final_blank_line -Layout/TrailingBlankLines: +Layout/TrailingEmptyLines: Exclude: - - 'app/views/admin/registrations/index.xlsx.axlsx' - 'lib/tasks/event_attatchments.rake' - 'lib/tasks/roles.rake' # Offense count: 13 +# Configuration parameters: IgnoredMethods. Lint/AmbiguousBlockAssociation: Exclude: - 'spec/controllers/admin/conferences_controller_spec.rb' @@ -371,17 +377,31 @@ Lint/AssignmentInCondition: Exclude: - 'bin/spring' +# Offense count: 1 +# Configuration parameters: AllowedMethods. +# AllowedMethods: enums +Lint/ConstantDefinitionInBlock: + Exclude: + - 'lib/tasks/data.rake' + +# Offense count: 5 +# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches. +Lint/DuplicateBranch: + Exclude: + - 'app/helpers/format_helper.rb' + - 'app/uploaders/picture_uploader.rb' + # Offense count: 2 -Lint/DuplicatedKey: +Lint/DuplicateHashKey: Exclude: - 'db/migrate/20140801164901_move_conference_media_to_commercial.rb' - 'db/migrate/20140801170430_move_event_media_to_commercial.rb' # Offense count: 1 -# Configuration parameters: AllowComments. -Lint/HandleExceptions: +# Configuration parameters: AllowComments, AllowEmptyLambdas. +Lint/EmptyBlock: Exclude: - - 'bin/rspec' + - 'spec/features/user_spec.rb' # Offense count: 4 Lint/IneffectiveAccessModifier: @@ -389,6 +409,18 @@ Lint/IneffectiveAccessModifier: - 'app/models/commercial.rb' - 'app/models/conference.rb' +# Offense count: 1 +# Cop supports --auto-correct. +Lint/NonDeterministicRequireOrder: + Exclude: + - 'spec/spec_helper.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Lint/RedundantCopDisableDirective: + Exclude: + - 'spec/support/save_feature_failures.rb' + # Offense count: 2 # Cop supports --auto-correct. Lint/ScriptPermission: @@ -397,10 +429,10 @@ Lint/ScriptPermission: - 'Rakefile' # Offense count: 1 -# Cop supports --auto-correct. -Lint/SendWithMixinArgument: +# Configuration parameters: AllowComments, AllowNil. +Lint/SuppressedException: Exclude: - - 'config/initializers/active_record_log_subscriber.rb' + - 'bin/rspec' # Offense count: 1 # Cop supports --auto-correct. @@ -411,18 +443,26 @@ Lint/UnusedBlockArgument: # Offense count: 1 # Cop supports --auto-correct. -# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods. +# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods. Lint/UnusedMethodArgument: Exclude: - 'config/initializers/fuckups.rb' -# Offense count: 139 -Metrics/AbcSize: - Max: 70 +# Offense count: 2 +# Cop supports --auto-correct. +Lint/UriRegexp: + Exclude: + - 'app/models/commercial.rb' + - 'app/models/contact.rb' -# Offense count: 314 -# Configuration parameters: CountComments, ExcludedMethods. -# ExcludedMethods: refine +# Offense count: 128 +# Configuration parameters: IgnoredMethods, CountRepeatedAttributes. +Metrics/AbcSize: + Max: 71 + +# Offense count: 315 +# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. +# IgnoredMethods: refine Metrics/BlockLength: Max: 1344 @@ -431,28 +471,30 @@ Metrics/BlockLength: Metrics/BlockNesting: Max: 4 -# Offense count: 13 -# Configuration parameters: CountComments. +# Offense count: 14 +# Configuration parameters: CountComments, CountAsOne. Metrics/ClassLength: Max: 652 -# Offense count: 33 +# Offense count: 28 +# Configuration parameters: IgnoredMethods. Metrics/CyclomaticComplexity: - Max: 14 + Max: 16 -# Offense count: 147 -# Configuration parameters: CountComments, ExcludedMethods. +# Offense count: 150 +# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. Metrics/MethodLength: Max: 56 # Offense count: 5 -# Configuration parameters: CountComments. +# Configuration parameters: CountComments, CountAsOne. Metrics/ModuleLength: Max: 173 -# Offense count: 22 +# Offense count: 25 +# Configuration parameters: IgnoredMethods. Metrics/PerceivedComplexity: - Max: 16 + Max: 19 # Offense count: 13 Naming/AccessorMethodName: @@ -461,22 +503,37 @@ Naming/AccessorMethodName: - 'app/models/user.rb' # Offense count: 2 -# Configuration parameters: Blacklist. -# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$)) +# Configuration parameters: ForbiddenDelimiters. +# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$)) Naming/HeredocDelimiterNaming: Exclude: - 'spec/factories/users.rb' - 'spec/models/user_spec.rb' +# Offense count: 10 +# Configuration parameters: CheckIdentifiers, CheckConstants, CheckVariables, CheckStrings, CheckSymbols, CheckComments, CheckFilepaths, FlaggedTerms. +Naming/InclusiveLanguage: + Exclude: + - 'app/controllers/admin/contacts_controller.rb' + - 'app/controllers/users_controller.rb' + - 'app/uploaders/picture_uploader.rb' + - 'config/application.rb' + # Offense count: 2 -# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros. +# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. +# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to +Naming/MethodParameterName: + Exclude: + - 'app/models/conference.rb' + +# Offense count: 2 +# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros. # NamePrefix: is_, has_, have_ -# NamePrefixBlacklist: is_, has_, have_ -# NameWhitelist: is_a? +# ForbiddenPrefixes: is_, has_, have_ +# AllowedMethods: is_a? # MethodDefinitionMacros: define_method, define_singleton_method Naming/PredicateName: Exclude: - - 'spec/**/*' - 'app/models/comment.rb' - 'app/models/contact.rb' @@ -488,18 +545,15 @@ Naming/RescuedExceptionsVariableName: - 'app/models/commercial.rb' - 'app/models/payment.rb' -# Offense count: 2 -# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. -# AllowedNames: io, id, to, by, on, in, at, ip, db -Naming/UncommunicativeMethodParamName: - Exclude: - - 'app/models/conference.rb' - -# Offense count: 2 -# Configuration parameters: EnforcedStyle. +# Offense count: 9 +# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers. # SupportedStyles: snake_case, normalcase, non_integer +# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339 Naming/VariableNumber: Exclude: + - 'app/models/program.rb' + - 'spec/factories/rooms.rb' + - 'spec/models/payment_spec.rb' - 'spec/models/ticket_purchase_spec.rb' # Offense count: 28 @@ -513,7 +567,31 @@ RSpec/AnyInstance: - 'spec/controllers/proposals_controller_spec.rb' - 'spec/controllers/tracks_controller_spec.rb' -# Offense count: 317 +# Offense count: 351 +# Cop supports --auto-correct. +RSpec/Capybara/CurrentPathExpectation: + Exclude: + - 'spec/features/base_controller_spec.rb' + - 'spec/features/cfp_ability_spec.rb' + - 'spec/features/commercials_spec.rb' + - 'spec/features/conference_registration_spec.rb' + - 'spec/features/info_desk_ability_spec.rb' + - 'spec/features/organization_admin_ability_spec.rb' + - 'spec/features/organizer_ability_spec.rb' + - 'spec/features/proposals_spec.rb' + - 'spec/features/registration_periods_spec.rb' + - 'spec/features/splashpage_spec.rb' + - 'spec/features/ticket_purchases_spec.rb' + - 'spec/features/track_organizer_ability_spec.rb' + - 'spec/features/user_ability_spec.rb' + +# Offense count: 162 +# Cop supports --auto-correct. +# Configuration parameters: EnabledMethods. +RSpec/Capybara/FeatureMethods: + Enabled: false + +# Offense count: 318 # Configuration parameters: Prefixes. # Prefixes: when, with, without RSpec/ContextWording: @@ -599,12 +677,12 @@ RSpec/EmptyLineAfterSubject: - 'spec/models/survey_spec.rb' - 'spec/models/track_spec.rb' -# Offense count: 220 -# Configuration parameters: Max. +# Offense count: 218 +# Configuration parameters: CountAsOne. RSpec/ExampleLength: - Enabled: false + Max: 187 -# Offense count: 18 +# Offense count: 19 # Cop supports --auto-correct. # Configuration parameters: CustomTransform, IgnoredWords. RSpec/ExampleWording: @@ -641,22 +719,34 @@ RSpec/ExpectChange: - 'spec/models/event_spec.rb' - 'spec/models/user_spec.rb' -# Offense count: 4 -# Configuration parameters: CustomTransform, IgnoreMethods. +# Offense count: 10 +# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. +# Include: **/*_spec*rb*, **/spec/**/* RSpec/FilePath: Exclude: - 'spec/controllers/conference_registration_controller_spec.rb' - 'spec/controllers/physical_ticket_controller_spec.rb' + - 'spec/features/email_spec.rb' + - 'spec/features/omniauth_spec.rb' + - 'spec/features/proposals_spec.rb' + - 'spec/features/ticket_purchases_spec.rb' + - 'spec/features/venues_spec.rb' + - 'spec/features/volunteers_spec.rb' - 'spec/models/comment_spec.rb' - 'spec/models/openid.rb' -# Offense count: 171 +# Offense count: 169 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: implicit, each, example RSpec/HookArgument: Enabled: false +# Offense count: 2 +RSpec/IdenticalEqualityAssertion: + Exclude: + - 'spec/controllers/admin/conferences_controller_spec.rb' + # Offense count: 140 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. @@ -723,7 +813,7 @@ RSpec/LeadingSubject: - 'spec/models/conference_spec.rb' - 'spec/models/ticket_spec.rb' -# Offense count: 55 +# Offense count: 59 RSpec/LetSetup: Enabled: false @@ -733,17 +823,22 @@ RSpec/LetSetup: RSpec/MessageSpies: EnforcedStyle: receive -# Offense count: 1 +# Offense count: 2 RSpec/MultipleDescribes: Exclude: - 'spec/controllers/application_controller_spec.rb' + - 'spec/models/conference_spec.rb' -# Offense count: 278 -# Configuration parameters: AggregateFailuresByDefault. +# Offense count: 279 RSpec/MultipleExpectations: Max: 97 -# Offense count: 387 +# Offense count: 247 +# Configuration parameters: AllowSubject. +RSpec/MultipleMemoizedHelpers: + Max: 32 + +# Offense count: 396 # Configuration parameters: IgnoreSharedExamples. RSpec/NamedSubject: Exclude: @@ -752,7 +847,7 @@ RSpec/NamedSubject: - 'spec/models/room_spec.rb' - 'spec/models/track_spec.rb' -# Offense count: 206 +# Offense count: 208 RSpec/NestedGroups: Max: 7 @@ -770,12 +865,19 @@ RSpec/OverwritingSetup: # Offense count: 2 # Cop supports --auto-correct. -# Configuration parameters: Strict, EnforcedStyle. +# Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers. # SupportedStyles: inflected, explicit RSpec/PredicateMatcher: Exclude: - 'spec/features/code_of_conduct_spec.rb' +# Offense count: 3 +# Cop supports --auto-correct. +RSpec/Rails/AvoidSetupHook: + Exclude: + - 'spec/features/versions_spec.rb' + - 'spec/helpers/events_helper_spec.rb' + # Offense count: 4 RSpec/RepeatedDescription: Exclude: @@ -786,6 +888,11 @@ RSpec/RepeatedExample: Exclude: - 'spec/models/conference_spec.rb' +# Offense count: 2 +RSpec/RepeatedExampleGroupBody: + Exclude: + - 'spec/models/conference_spec.rb' + # Offense count: 10 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. @@ -795,6 +902,7 @@ RSpec/ReturnFromStub: - 'spec/helpers/events_helper_spec.rb' # Offense count: 19 +# Cop supports --auto-correct. RSpec/ScatteredLet: Exclude: - 'spec/ability/ability_spec.rb' @@ -805,6 +913,11 @@ RSpec/ScatteredSetup: Exclude: - 'spec/models/payment_spec.rb' +# Offense count: 9 +RSpec/StubbedMock: + Exclude: + - 'spec/helpers/events_helper_spec.rb' + # Offense count: 7 RSpec/SubjectStub: Exclude: @@ -829,6 +942,28 @@ Security/Open: Exclude: - 'app/pdfs/ticket_pdf.rb' +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: separated, grouped +Style/AccessorGrouping: + Exclude: + - 'app/models/payment.rb' + +# Offense count: 12 +# Cop supports --auto-correct. +Style/CaseLikeIf: + Exclude: + - 'app/controllers/admin/roles_controller.rb' + - 'app/controllers/admin/users_controller.rb' + - 'app/helpers/application_helper.rb' + - 'app/helpers/versions_helper.rb' + - 'app/models/user.rb' + - 'app/views/admin/booths/booths.xlsx.axlsx' + - 'app/views/admin/events/events.xlsx.axlsx' + - 'app/views/admin/tracks/tracks.xlsx.axlsx' + - 'lib/tasks/version.rake' + # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. @@ -837,11 +972,6 @@ Style/ClassCheck: Exclude: - 'app/models/email_settings.rb' -# Offense count: 1 -Style/ClassVars: - Exclude: - - 'spec/support/kneet_connections.rb' - # Offense count: 2 # Cop supports --auto-correct. Style/ColonMethodCall: @@ -849,22 +979,38 @@ Style/ColonMethodCall: - 'app/models/commercial.rb' - 'app/models/contact.rb' -# Offense count: 4 +# Offense count: 1 +Style/CombinableLoops: + Exclude: + - 'db/migrate/20140820093735_migrating_supporter_registrations_to_ticket_users.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: Keywords, RequireColon. +# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE +Style/CommentAnnotation: + Exclude: + - 'spec/controllers/admin/versions_controller_spec.rb' + +# Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. # SupportedStyles: assign_to_condition, assign_inside_condition Style/ConditionalAssignment: Exclude: - 'app/helpers/format_helper.rb' - - 'config/initializers/airbrake.rb' - 'db/migrate/20140610165551_migrate_data_person_to_user.rb' - 'db/migrate/20140820124117_undo_wrong_migration20140801080705_add_users_to_events.rb' -# Offense count: 516 +# Offense count: 501 +# Configuration parameters: AllowedConstants. Style/Documentation: Enabled: false # Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: allowed_in_returns, forbidden Style/DoubleNegation: Exclude: - 'config/environments/production.rb' @@ -905,7 +1051,7 @@ Style/Encoding: - 'config/initializers/money.rb' - 'spec/models/conference_spec.rb' -# Offense count: 10 +# Offense count: 11 # Cop supports --auto-correct. Style/ExpandPathArguments: Exclude: @@ -915,29 +1061,59 @@ Style/ExpandPathArguments: - 'bin/rspec' - 'bin/setup' - 'bin/update' + - 'config.ru' - 'config/application.rb' - 'config/environment.rb' - 'spec/spec_helper.rb' -# Offense count: 1 -# Configuration parameters: EnforcedStyle. -# SupportedStyles: annotated, template, unannotated -Style/FormatStringToken: +# Offense count: 9 +# Cop supports --auto-correct. +Style/ExplicitBlockArgument: Exclude: - - 'app/uploaders/picture_uploader.rb' + - 'Guardfile' -# Offense count: 49 +# Offense count: 48 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. -# SupportedStyles: always, never +# SupportedStyles: always, always_true, never Style/FrozenStringLiteralComment: Enabled: false -# Offense count: 29 +# Offense count: 1 +# Cop supports --auto-correct. +Style/GlobalStdStream: + Exclude: + - 'config/environments/production.rb' + +# Offense count: 28 # Configuration parameters: MinBodyLength. Style/GuardClause: Enabled: false +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: braces, no_braces +Style/HashAsLastArrayItem: + Exclude: + - 'app/controllers/admin/schedules_controller.rb' + - 'app/models/user.rb' + +# Offense count: 5 +# Cop supports --auto-correct. +# Configuration parameters: AllowSplatArgument. +Style/HashConversion: + Exclude: + - 'app/helpers/chart_helper.rb' + - 'app/models/conference.rb' + - 'spec/factories/event_users.rb' + +# Offense count: 1 +# Configuration parameters: MinBranchesCount. +Style/HashLikeCase: + Exclude: + - 'app/helpers/versions_helper.rb' + # Offense count: 7 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. @@ -949,7 +1125,14 @@ Style/HashSyntax: - 'app/views/admin/registrations/index.xlsx.axlsx' - 'lib/tasks/user.rake' -# Offense count: 58 +# Offense count: 2 +# Cop supports --auto-correct. +Style/HashTransformValues: + Exclude: + - 'app/controllers/admin/comments_controller.rb' + - 'app/helpers/chart_helper.rb' + +# Offense count: 59 # Cop supports --auto-correct. Style/IfUnlessModifier: Enabled: false @@ -1000,8 +1183,8 @@ Style/MutableConstant: # Offense count: 4 # Cop supports --auto-correct. -# Configuration parameters: Whitelist. -# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with +# Configuration parameters: AllowedMethods. +# AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with Style/NestedParenthesizedCalls: Exclude: - 'spec/features/conference_spec.rb' @@ -1014,7 +1197,7 @@ Style/NestedParenthesizedCalls: Style/Next: Enabled: false -# Offense count: 120 +# Offense count: 115 # Cop supports --auto-correct. # Configuration parameters: EnforcedOctalStyle. # SupportedOctalStyles: zero_with_o, zero_only @@ -1022,14 +1205,13 @@ Style/NumericLiteralPrefix: Exclude: - 'config/environments/test.rb' - 'spec/controllers/admin/conferences_controller_spec.rb' - - 'spec/controllers/conference_registration_controller_spec.rb' - 'spec/helpers/date_time_helper_spec.rb' - 'spec/models/conference_spec.rb' - 'spec/models/email_settings_spec.rb' - 'spec/serializers/conference_serializer_spec.rb' - 'spec/serializers/event_serializer_spec.rb' -# Offense count: 8 +# Offense count: 7 # Cop supports --auto-correct. # Configuration parameters: Strict. Style/NumericLiterals: @@ -1037,11 +1219,10 @@ Style/NumericLiterals: # Offense count: 36 # Cop supports --auto-correct. -# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods. +# Configuration parameters: EnforcedStyle, IgnoredMethods. # SupportedStyles: predicate, comparison Style/NumericPredicate: Exclude: - - 'spec/**/*' - 'app/controllers/admin/conferences_controller.rb' - 'app/helpers/application_helper.rb' - 'app/helpers/date_time_helper.rb' @@ -1060,6 +1241,16 @@ Style/OptionalArguments: Exclude: - 'app/models/event.rb' +# Offense count: 8 +# Configuration parameters: AllowedMethods. +# AllowedMethods: respond_to_missing? +Style/OptionalBooleanParameter: + Exclude: + - 'app/controllers/admin/events_controller.rb' + - 'app/helpers/application_helper.rb' + - 'app/helpers/format_helper.rb' + - 'app/models/event.rb' + # Offense count: 1 # Cop supports --auto-correct. Style/OrAssignment: @@ -1075,7 +1266,7 @@ Style/ParenthesesAroundCondition: - 'app/controllers/application_controller.rb' - 'app/helpers/format_helper.rb' -# Offense count: 22 +# Offense count: 21 # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: @@ -1091,7 +1282,7 @@ Style/PreferredHashMethods: # Offense count: 6 # Cop supports --auto-correct. -# Configuration parameters: . +# Configuration parameters: AllowedCompactTypes. # SupportedStyles: compact, exploded Style/RaiseArgs: EnforcedStyle: compact @@ -1102,13 +1293,50 @@ Style/RandomWithOffset: Exclude: - 'spec/factories/sponsors.rb' +# Offense count: 3 +# Cop supports --auto-correct. +Style/RedundantAssignment: + Exclude: + - 'app/helpers/application_helper.rb' + - 'app/helpers/format_helper.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Style/RedundantCondition: + Exclude: + - 'app/helpers/versions_helper.rb' + - 'app/models/ticket.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: SafeForConstants. +Style/RedundantFetchBlock: + Exclude: + - 'config/puma.rb' + # Offense count: 1 # Cop supports --auto-correct. Style/RedundantParentheses: Exclude: - 'app/controllers/admin/base_controller.rb' -# Offense count: 4 +# Offense count: 6 +# Cop supports --auto-correct. +Style/RedundantRegexpEscape: + Exclude: + - 'spec/models/room_spec.rb' + - 'spec/models/user_spec.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: AllowMultipleReturnValues. +Style/RedundantReturn: + Exclude: + - 'app/controllers/admin/booths_controller.rb' + - 'app/controllers/admin/events_controller.rb' + - 'app/controllers/admin/organizations_controller.rb' + +# Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, AllowInnerSlashes. # SupportedStyles: slashes, percent_r, mixed @@ -1116,7 +1344,6 @@ Style/RegexpLiteral: Exclude: - 'Guardfile' - 'app/uploaders/picture_uploader.rb' - - 'config/initializers/airbrake.rb' # Offense count: 2 # Cop supports --auto-correct. @@ -1143,7 +1370,25 @@ Style/SingleLineMethods: Exclude: - 'Guardfile' -# Offense count: 611 +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: AllowModifier. +Style/SoleNestedConditional: + Exclude: + - 'app/controllers/admin/users_controller.rb' + - 'app/models/event.rb' + - 'app/models/user.rb' + - 'db/migrate/20140801164901_move_conference_media_to_commercial.rb' + - 'db/migrate/20140801170430_move_event_media_to_commercial.rb' + - 'db/migrate/20151018152439_create_programs_table.rb' + +# Offense count: 31 +# Cop supports --auto-correct. +# Configuration parameters: Mode. +Style/StringConcatenation: + Enabled: false + +# Offense count: 31 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. # SupportedStyles: single_quotes, double_quotes @@ -1171,7 +1416,7 @@ Style/StringLiteralsInInterpolation: - 'app/views/admin/events/_confirmed_events.xlsx.axlsx' - 'lib/tasks/dump_db.rake' -# Offense count: 110 +# Offense count: 108 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, MinSize. # SupportedStyles: percent, brackets @@ -1180,7 +1425,7 @@ Style/SymbolArray: # Offense count: 10 # Cop supports --auto-correct. -# Configuration parameters: IgnoredMethods. +# Configuration parameters: AllowMethodsWithArguments, IgnoredMethods. # IgnoredMethods: respond_to, define_method Style/SymbolProc: Exclude: @@ -1223,24 +1468,17 @@ Style/UnlessElse: Exclude: - 'config/routes.rb' -# Offense count: 2 -# Cop supports --auto-correct. -Style/UnneededCondition: - Exclude: - - 'app/helpers/versions_helper.rb' - - 'app/models/ticket.rb' - -# Offense count: 9 +# Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: WordRegex. # SupportedStyles: percent, brackets Style/WordArray: EnforcedStyle: percent - MinSize: 8 + MinSize: 6 -# Offense count: 2915 +# Offense count: 533 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https -Metrics/LineLength: +Layout/LineLength: Max: 619 diff --git a/Gemfile b/Gemfile index b6beb56e..dd3bd99c 100644 --- a/Gemfile +++ b/Gemfile @@ -229,7 +229,8 @@ group :development do gem 'spring-commands-rspec' # for static code analisys gem 'rubocop', require: false - gem 'rubocop-rspec' + gem 'rubocop-rspec', require: false + gem 'rubocop-rails', require: false # to open mails gem 'letter_opener' gem 'letter_opener_web' diff --git a/Gemfile.lock b/Gemfile.lock index 53952c79..bf9455e3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -253,7 +253,6 @@ GEM ruby-vips (>= 2.0.17, < 3) io-like (0.3.1) iso-639 (0.2.8) - jaro_winkler (1.5.4) jquery-datatables-rails (3.4.0) actionpack (>= 3.1) jquery-rails @@ -360,9 +359,9 @@ GEM paper_trail (10.3.1) activerecord (>= 4.2) request_store (~> 1.1) - parallel (1.18.0) - parser (2.6.5.0) - ast (~> 2.4.0) + parallel (1.20.1) + parser (3.0.2.0) + ast (~> 2.4.1) pdf-core (0.9.0) pdf-inspector (1.3.0) pdf-reader (>= 1.0, < 3.0.a) @@ -503,18 +502,27 @@ GEM rspec-mocks (~> 3.6.0) rspec-support (~> 3.6.0) rspec-support (3.6.0) - rubocop (0.75.1) - jaro_winkler (~> 1.5.1) + rubocop (1.19.0) parallel (~> 1.10) - parser (>= 2.6) + parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml + rubocop-ast (>= 1.9.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.7) - rubocop-rspec (1.36.0) - rubocop (>= 0.68.1) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.10.0) + parser (>= 3.0.1.1) + rubocop-rails (2.11.3) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.7.0, < 2.0) + rubocop-rspec (2.4.0) + rubocop (~> 1.0) + rubocop-ast (>= 1.1.0) ruby-oembed (0.12.0) ruby-openid (2.9.2) - ruby-progressbar (1.10.1) + ruby-progressbar (1.11.0) ruby-rc4 (0.1.5) ruby-vips (2.1.2) ffi (~> 1.12) @@ -602,7 +610,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.7) - unicode-display_width (1.6.1) + unicode-display_width (2.0.0) unicode_utils (1.4.0) unobtrusive_flash (3.3.1) railties @@ -722,6 +730,7 @@ DEPENDENCIES rspec-activemodel-mocks rspec-rails rubocop + rubocop-rails rubocop-rspec ruby-oembed sass-rails (>= 4.0.2)