From 2649c4ec7ab29e9c85ddac18d5a86066c753f21b Mon Sep 17 00:00:00 2001 From: sarahcrack <73823091+sarahcrack@users.noreply.github.com> Date: Mon, 18 Nov 2024 15:00:58 +0000 Subject: [PATCH 1/2] updated libraries --- .rubocop.yml | 5 +++++ Gemfile | 3 +++ Gemfile.lock | 44 +++++++++++++++++++++++++++----------------- 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index e879c481e..5ddfc0dbb 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,8 @@ +require: + - rubocop-rspec + - rubocop-capybara + - rubocop-factory_bot + inherit_gem: rubocop-govuk: - config/default.yml diff --git a/Gemfile b/Gemfile index 398843532..1dcca33f2 100644 --- a/Gemfile +++ b/Gemfile @@ -152,6 +152,9 @@ group :test do gem 'rails-controller-testing', '>= 1.0.5' gem "rspec-json_expectations", "~> 2.2" + gem 'rubocop-capybara', '~> 2.21' + gem 'rubocop-factory_bot', '~> 2.26' + gem 'rubocop-rspec', '~> 3.2' gem 'shoulda-matchers', '~> 6.1' gem 'capybara-screenshot' diff --git a/Gemfile.lock b/Gemfile.lock index d07ffca7a..f2eeac707 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -350,6 +350,7 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) + language_server-protocol (3.17.0.3) launchy (2.5.0) addressable (~> 2.7) listen (3.9.0) @@ -545,32 +546,38 @@ GEM rspec-support (3.13.1) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.31.2) + rubocop (1.68.0) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.18.0, < 2.0) + regexp_parser (>= 2.4, < 3.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.19.1) - parser (>= 3.1.1.0) - rubocop-govuk (4.6.0) - rubocop (= 1.31.2) - rubocop-ast (= 1.19.1) - rubocop-rails (= 2.15.2) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.36.1) + parser (>= 3.3.1.0) + rubocop-capybara (2.21.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.26.1) + rubocop (~> 1.61) + rubocop-govuk (5.0.3) + rubocop (= 1.68.0) + rubocop-ast (= 1.36.1) + rubocop-capybara (= 2.21.0) + rubocop-rails (= 2.27.0) rubocop-rake (= 0.6.0) - rubocop-rspec (= 2.12.1) - rubocop-rails (2.15.2) + rubocop-rspec (= 3.2.0) + rubocop-rails (2.27.0) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.7.0, < 2.0) + rubocop (>= 1.52.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.12.1) - rubocop (~> 1.31) + rubocop-rspec (3.2.0) + rubocop (~> 1.61) ruby-graphviz (1.2.5) rexml ruby-next-core (1.0.3) @@ -776,7 +783,10 @@ DEPENDENCIES rspec-rails (~> 6.1.1) rspec-sonarqube-formatter rspec_junit_formatter + rubocop-capybara (~> 2.21) + rubocop-factory_bot (~> 2.26) rubocop-govuk + rubocop-rspec (~> 3.2) selenium-webdriver sentry-rails sentry-ruby From b84961a83180ce1a258fda0a9e6d2ac202e1dca7 Mon Sep 17 00:00:00 2001 From: sarahcrack <73823091+sarahcrack@users.noreply.github.com> Date: Wed, 20 Nov 2024 11:13:36 +0000 Subject: [PATCH 2/2] created todo list and updated rubocop.yml file --- .rubocop.yml | 9 + .rubocop_todo.yml | 572 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 581 insertions(+) create mode 100644 .rubocop_todo.yml diff --git a/.rubocop.yml b/.rubocop.yml index 5ddfc0dbb..b3198c60e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,5 @@ +inherit_from: .rubocop_todo.yml + require: - rubocop-rspec - rubocop-capybara @@ -108,3 +110,10 @@ Rails/TimeZone: Rails/Date: Enabled: false + +AllCops: + Exclude: + - "node_modules/**/*" + - "vendor/**/*" + - "db/schema.rb" + - "db/migrate/*.rb" diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 000000000..10719809e --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,572 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2024-11-20 10:51:05 UTC using RuboCop version 1.68.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: 63 +# This cop supports safe autocorrection (--autocorrect). +Capybara/CurrentPathExpectation: + Enabled: false + +# Offense count: 1 +Capybara/VisibilityMatcher: + Exclude: + - "features/step_definitions/candidates/schools/filtering_steps.rb" + +# Offense count: 36 +# This cop supports safe autocorrection (--autocorrect). +FactoryBot/FactoryClassName: + Enabled: false + +# Offense count: 3 +# Configuration parameters: EnforcedStyle, AllowedGems, Include. +# SupportedStyles: Gemfile, gems.rb, gemspec +# Include: **/*.gemspec, **/Gemfile, **/gems.rb +Gemspec/DevelopmentDependencies: + Exclude: + - "node_modules/dfe-autocomplete/dfe-autocomplete.gemspec" + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowForAlignment. +Layout/CommentIndentation: + Exclude: + - "config/initializers/filter_active_job_logging.rb" + +# Offense count: 1 +# Configuration parameters: DebuggerMethods, DebuggerRequires. +Lint/Debugger: + Exclude: + - "features/step_definitions/common_steps.rb" + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowedMethods. +# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?, presence, present? +Lint/RedundantSafeNavigation: + Exclude: + - "app/models/bookings/booking.rb" + +# Offense count: 88 +RSpec/AnyInstance: + Enabled: false + +# Offense count: 17 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/BeEq: + Exclude: + - "spec/forms/schools/on_boarding/from_bookings_school_spec.rb" + - "spec/forms/schools/placement_dates/configuration_form_spec.rb" + - "spec/forms/schools/placement_dates/placement_detail_spec.rb" + - "spec/presenters/schools/on_boarding/school_profile_presenter_spec.rb" + - "spec/services/candidates/registrations/personal_information_spec.rb" + - "spec/services/candidates/registrations/registration_as_placement_request_spec.rb" + - "spec/services/candidates/registrations/registration_store_spec.rb" + - "spec/support/registration_step_shared_examples.rb" + +# Offense count: 16 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/BeEql: + Exclude: + - "spec/controllers/candidates/registrations/personal_informations_controller_spec.rb" + - "spec/controllers/schools/change_schools_controller_spec.rb" + - "spec/controllers/schools/sessions_controller_spec.rb" + - "spec/helpers/candidates/registrations/subject_and_date_information_helper_spec.rb" + - "spec/models/bookings/candidate_spec.rb" + - "spec/models/bookings/profile_publisher_spec.rb" + - "spec/models/candidates/session_spec.rb" + - "spec/models/cookie_preference_spec.rb" + - "spec/models/healthcheck_spec.rb" + - "spec/models/schools/attendance_spec.rb" + - "spec/models/schools/change_school_spec.rb" + +# Offense count: 16 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: be, be_nil +RSpec/BeNil: + Exclude: + - "spec/controllers/candidates/sessions_controller_spec.rb" + - "spec/controllers/schools/placement_dates/configurations_controller_spec.rb" + - "spec/forms/schools/on_boarding/candidate_requirements_selection_spec.rb" + - "spec/forms/schools/on_boarding/dbs_requirement_spec.rb" + - "spec/forms/schools/placement_dates/configuration_form_spec.rb" + - "spec/forms/schools/placement_dates/subject_selection_spec.rb" + - "spec/lib/geocoding_response_country_spec.rb" + - "spec/models/healthcheck_spec.rb" + - "spec/models/schools/attendance_spec.rb" + - "spec/services/candidates/registrations/registration_session_spec.rb" + +# Offense count: 12 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: be_a, be_kind_of +RSpec/ClassCheck: + Exclude: + - "spec/controllers/schools/placement_requests_controller_spec.rb" + - "spec/models/bookings/candidate_spec.rb" + - "spec/models/bookings/profile_publisher_spec.rb" + - "spec/models/candidates/school_search_spec.rb" + +# Offense count: 379 +# This cop supports safe autocorrection (--autocorrect). +RSpec/ContextMethod: + Enabled: false + +# Offense count: 995 +# Configuration parameters: Prefixes, AllowedPatterns. +# Prefixes: when, with, without +RSpec/ContextWording: + Enabled: false + +# Offense count: 58 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants. +# SupportedStyles: described_class, explicit +RSpec/DescribedClass: + Exclude: + - "node_modules/dfe-autocomplete/spec/components/dfe/autocomplete/view_spec.rb" + - "spec/models/bookings/candidate_spec.rb" + - "spec/models/bookings/data/school_mass_importer_spec.rb" + - "spec/models/bookings/placement_date_subject_spec.rb" + - "spec/models/bookings/school_search_spec.rb" + - "spec/models/bookings/school_spec.rb" + - "spec/models/feature_spec.rb" + - "spec/notify/notify_despatchers/notify_spec.rb" + - "spec/services/bookings/reminder_spec.rb" + - "spec/services/schools/dfe_sign_in_api/client_spec.rb" + - "spec/services/schools/dfe_sign_in_api/organisations_spec.rb" + - "spec/validators/website_validator_spec.rb" + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AutoCorrect. +RSpec/EmptyExampleGroup: + Exclude: + - "spec/views/candidates/schools/index.html.erb_spec.rb" + - "spec/views/schools/change_schools/show.html.erb_spec.rb" + +# Offense count: 17 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowConsecutiveOneLiners. +RSpec/EmptyLineAfterExample: + Exclude: + - "spec/controllers/cookie_preferences_controller_spec.rb" + - "spec/forms/schools/placement_dates/placement_detail_spec.rb" + - "spec/models/bookings/booking_spec.rb" + - "spec/models/bookings/candidate_spec.rb" + - "spec/models/bookings/phase_spec.rb" + - "spec/models/bookings/subject_spec.rb" + - "spec/models/user_spec.rb" + - "spec/services/bookings/gitis/contact_fetcher_spec.rb" + - "spec/services/candidates/registrations/registration_session_spec.rb" + +# Offense count: 152 +# This cop supports safe autocorrection (--autocorrect). +RSpec/EmptyLineAfterFinalLet: + Enabled: false + +# Offense count: 60 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowConsecutiveOneLiners. +RSpec/EmptyLineAfterHook: + Enabled: false + +# Offense count: 131 +# This cop supports safe autocorrection (--autocorrect). +RSpec/EmptyLineAfterSubject: + Enabled: false + +# Offense count: 79 +# Configuration parameters: CountAsOne. +RSpec/ExampleLength: + Max: 31 + +# Offense count: 180 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples. +# DisallowedExamples: works +RSpec/ExampleWording: + Enabled: false + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +RSpec/ExcessiveDocstringSpacing: + Exclude: + - "spec/models/feature_spec.rb" + +# Offense count: 5 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: method_call, block +RSpec/ExpectChange: + Exclude: + - "spec/controllers/candidates/booking_feedbacks_controller_spec.rb" + - "spec/controllers/candidates/registrations/sign_ins_controller_spec.rb" + - "spec/models/bookings/placement_date_spec.rb" + - "spec/models/bookings/placement_request_spec.rb" + - "spec/services/bookings/reminder_spec.rb" + +# Offense count: 4 +RSpec/ExpectInHook: + Exclude: + - "spec/controllers/candidates/registrations/sign_ins_controller_spec.rb" + - "spec/jobs/notify_job_spec.rb" + - "spec/services/bookings/gitis/school_experience_spec.rb" + +# Offense count: 9 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: implicit, each, example +RSpec/HookArgument: + Exclude: + - "spec/controllers/candidates/registrations/placement_requests_controller_spec.rb" + - "spec/models/bookings/placement_request_spec.rb" + - "spec/rails_helper.rb" + - "spec/services/candidates/registrations/availability_preference_spec.rb" + - "spec/services/candidates/registrations/placement_preference_spec.rb" + - "spec/validators/number_of_words_validator_spec.rb" + +# Offense count: 8 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AutoCorrect. +RSpec/HooksBeforeExamples: + Exclude: + - "spec/controllers/schools/archived_placement_requests_controller_spec.rb" + - "spec/notify/notify_email/candidate_booking_reminder_spec.rb" + - "spec/notify/notify_email/candidate_virtual_experience_booking_reminder_spec.rb" + - "spec/services/candidates/registrations/subject_and_date_information_spec.rb" + +# Offense count: 4 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: is_expected, should +RSpec/ImplicitExpect: + Exclude: + - "spec/models/bookings/school_spec.rb" + +# Offense count: 231 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: single_line_only, single_statement_only, disallow, require_implicit +RSpec/ImplicitSubject: + Enabled: false + +# Offense count: 36 +# Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns. +RSpec/IndexedLet: + Exclude: + - "spec/helpers/candidates/school_helper_spec.rb" + - "spec/jobs/cron/identify_closed_schools_job_spec.rb" + - "spec/models/bookings/data/gias_reconciler_spec.rb" + - "spec/models/bookings/data/school_updater_spec.rb" + - "spec/models/bookings/placement_request_spec.rb" + - "spec/models/candidates/school_search_spec.rb" + - "spec/models/schools/attendance_spec.rb" + - "spec/services/schools/dfe_sign_in_api/role_checked_organisations_spec.rb" + +# Offense count: 89 +# Configuration parameters: AssignmentOnly. +RSpec/InstanceVariable: + Enabled: false + +# Offense count: 26 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: it_behaves_like, it_should_behave_like +RSpec/ItBehavesLike: + Enabled: false + +# Offense count: 237 +# This cop supports safe autocorrection (--autocorrect). +RSpec/LeadingSubject: + Enabled: false + +# Offense count: 78 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AutoCorrect. +RSpec/LetBeforeExamples: + Enabled: false + +# Offense count: 72 +RSpec/LetSetup: + Enabled: false + +# Offense count: 10 +# This cop supports safe autocorrection (--autocorrect). +RSpec/MatchArray: + Exclude: + - "spec/models/bookings/booking_spec.rb" + - "spec/models/bookings/placement_date_spec.rb" + - "spec/models/bookings/placement_request_spec.rb" + - "spec/models/schools/attendance_spec.rb" + +# Offense count: 4 +RSpec/MessageChain: + Exclude: + - "spec/models/bookings/placement_date_spec.rb" + - "spec/services/candidates/registrations/dbs_requirments_checker_spec.rb" + +# Offense count: 21 +# Configuration parameters: EnforcedStyle. +# SupportedStyles: have_received, receive +RSpec/MessageSpies: + Exclude: + - "spec/controllers/schools/sessions_controller_spec.rb" + - "spec/jobs/cron/identify_closed_schools_job_spec.rb" + - "spec/lib/notify/notify_sync_spec.rb" + - "spec/models/bookings/booking_spec.rb" + - "spec/models/bookings/school_search_spec.rb" + - "spec/services/schools/dfe_sign_in_api/user_invite_spec.rb" + - "spec/validators/website_validator_spec.rb" + +# Offense count: 2 +RSpec/MultipleDescribes: + Exclude: + - "spec/jobs/notify_job_spec.rb" + - "spec/notify/notify_despatchers/notify_spec.rb" + +# Offense count: 164 +RSpec/MultipleExpectations: + Max: 11 + +# Offense count: 362 +# Configuration parameters: AllowSubject. +RSpec/MultipleMemoizedHelpers: + Max: 15 + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +RSpec/MultipleSubjects: + Exclude: + - "spec/models/schools/change_school_spec.rb" + +# Offense count: 1071 +# Configuration parameters: EnforcedStyle, IgnoreSharedExamples. +# SupportedStyles: always, named_only +RSpec/NamedSubject: + Enabled: false + +# Offense count: 708 +# Configuration parameters: AllowedGroups. +RSpec/NestedGroups: + Max: 6 + +# Offense count: 4 +# Configuration parameters: AllowedPatterns. +# AllowedPatterns: ^expect_, ^assert_ +RSpec/NoExpectationExample: + Exclude: + - "spec/features/candidates/api_registrations_spec.rb" + - "spec/services/bookings/gitis/school_experience_spec.rb" + +# Offense count: 12 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: not_to, to_not +RSpec/NotToNot: + Exclude: + - "spec/controllers/candidates/schools_controller_spec.rb" + - "spec/controllers/schools/on_boarding/administration_fees_controller_spec.rb" + - "spec/controllers/schools/on_boarding/dbs_fees_controller_spec.rb" + - "spec/controllers/schools/on_boarding/other_fees_controller_spec.rb" + - "spec/forms/schools/placement_dates/placement_detail_spec.rb" + - "spec/models/bookings/placement_date_spec.rb" + - "spec/services/bookings/gitis/school_experience_spec.rb" + - "spec/services/candidates/registrations/teaching_preference_spec.rb" + - "spec/views/candidates/schools/index.html.erb_spec.rb" + +# Offense count: 3 +RSpec/OverwritingSetup: + Exclude: + - "spec/forms/schools/placement_dates/placement_detail_spec.rb" + - "spec/models/schools/change_school_spec.rb" + +# Offense count: 6 +RSpec/PendingWithoutReason: + Exclude: + - "spec/controllers/healthchecks_controller_spec.rb" + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers. +# SupportedStyles: inflected, explicit +RSpec/PredicateMatcher: + Exclude: + - "spec/models/candidates/school_search_spec.rb" + +# Offense count: 16 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/ReceiveMessages: + Exclude: + - "spec/controllers/schools/sessions_controller_spec.rb" + - "spec/lib/notify/notify_sync_spec.rb" + - "spec/models/bookings/school_sync_spec.rb" + - "spec/views/candidates/schools/index.html.erb_spec.rb" + - "spec/views/schools/change_schools/show.html.erb_spec.rb" + +# Offense count: 10 +RSpec/RepeatedDescription: + Exclude: + - "spec/controllers/schools/placement_requests_controller_spec.rb" + - "spec/views/candidates/registrations/personal_informations/_form.html.erb_spec.rb" + +# Offense count: 5 +RSpec/RepeatedExample: + Exclude: + - "spec/models/bookings/school_search_spec.rb" + - "spec/services/bookings/gitis/missing_contact_spec.rb" + +# Offense count: 2 +RSpec/RepeatedExampleGroupBody: + Exclude: + - "spec/services/candidates/registrations/dbs_requirments_checker_spec.rb" + +# Offense count: 14 +RSpec/RepeatedExampleGroupDescription: + Exclude: + - "spec/controllers/healthchecks_controller_spec.rb" + - "spec/lib/conversions_spec.rb" + - "spec/models/bookings/booking_spec.rb" + - "spec/models/bookings/schools_phase_spec.rb" + - "spec/models/cookie_preference_spec.rb" + - "spec/presenters/candidates/school_presenter_spec.rb" + - "spec/services/candidates/registrations/subject_and_date_information_spec.rb" + +# Offense count: 43 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: and_return, block +RSpec/ReturnFromStub: + Enabled: false + +# Offense count: 20 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AutoCorrect. +RSpec/ScatteredLet: + Exclude: + - "spec/controllers/candidates/registrations/educations_controller_spec.rb" + - "spec/controllers/candidates/registrations/subject_and_date_informations_controller_spec.rb" + - "spec/controllers/candidates/registrations/teaching_preferences_controller_spec.rb" + - "spec/controllers/schools/change_schools_controller_spec.rb" + - "spec/controllers/schools/on_boarding/access_needs_details_controller_spec.rb" + - "spec/controllers/schools/on_boarding/access_needs_policies_controller_spec.rb" + - "spec/controllers/schools/on_boarding/disability_confidents_controller_spec.rb" + - "spec/controllers/schools/on_boarding/subjects_controller_spec.rb" + - "spec/lib/geocoder_autoexpire_cache_spec.rb" + - "spec/models/schools/school_profile_spec.rb" + - "spec/notify/notify_email/candidate_booking_reminder_spec.rb" + - "spec/notify/notify_email/candidate_virtual_experience_booking_reminder_spec.rb" + - "spec/services/bookings/gitis/contact_fetcher_spec.rb" + - "spec/services/candidates/registrations/subject_and_date_information_spec.rb" + +# Offense count: 100 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AutoCorrect. +RSpec/ScatteredSetup: + Enabled: false + +# Offense count: 7 +# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. +# Include: **/*_spec.rb +RSpec/SpecFilePathFormat: + Exclude: + - "node_modules/dfe-autocomplete/spec/components/dfe/autocomplete/view_spec.rb" + - "node_modules/dfe-autocomplete/spec/helpers/dfe/autocomplete/application_helper_spec.rb" + - "spec/controllers/features_controller_spec.rb" + - "spec/controllers/schools/contact_us_spec.rb" + - "spec/controllers/schools/switch_controller_spec.rb" + - "spec/jobs/cron/send_entity_table_checks_to_bigquery_spec.rb" + - "spec/notify/notify_email/candidate_booking_feedback_spec.rb" + +# Offense count: 1 +RSpec/StubbedMock: + Exclude: + - "spec/services/bookings/reminder_spec.rb" + +# Offense count: 61 +RSpec/SubjectStub: + Exclude: + - "spec/forms/schools/placement_dates/placement_detail_spec.rb" + - "spec/lib/notify/notify_sync_spec.rb" + - "spec/models/bookings/data/gias_data_file_spec.rb" + - "spec/models/bookings/placement_request_spec.rb" + - "spec/models/bookings/school_search_spec.rb" + - "spec/models/bookings/school_spec.rb" + - "spec/models/bookings/school_sync_spec.rb" + - "spec/presenters/candidates/placement_presenter_spec.rb" + - "spec/services/candidates/registrations/subject_and_date_information_spec.rb" + - "spec/services/schools/dfe_sign_in_api/client_spec.rb" + - "spec/services/schools/dfe_sign_in_api/organisation_spec.rb" + - "spec/services/schools/dfe_sign_in_api/organisations_spec.rb" + - "spec/services/schools/dfe_sign_in_api/roles_spec.rb" + - "spec/support/registration_step_shared_examples.rb" + +# Offense count: 47 +# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames. +RSpec/VerifiedDoubles: + Enabled: false + +# Offense count: 8 +# Configuration parameters: Database, Include. +# SupportedDatabases: mysql, postgresql +# Include: db/**/*.rb +Rails/BulkChangeTable: + Exclude: + - "db/migrate/20210121091849_add_online_to_bookings_placement_dates.rb" + - "db/migrate/20210130095443_add_dbs_policy_conditions_to_bookings_profile.rb" + - "db/migrate/20220119115856_add_availability_offsets_to_bookings_placement_dates.rb" + - "db/migrate/20220810101108_add_default_to_bookings_school_availability.rb" + - "db/migrate/20220810142124_make_availability_info_and_experience_type_not_nullable.rb" + - "db/migrate/20220907093024_add_rejection_categories_to_bookings_placement_request_cancellations.rb" + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: slashes, arguments +Rails/FilePath: + Exclude: + - "spec/rails_helper.rb" + +# Offense count: 11 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowedMethods, AllowedPatterns. +# AllowedMethods: order, limit, select, lock +Rails/FindEach: + Exclude: + - "features/step_definitions/candidates/registrations/subject_and_date_information_steps.rb" + - "features/step_definitions/candidates/schools/results_steps.rb" + - "features/step_definitions/schools/bookings_steps.rb" + - "features/step_definitions/schools/cancelled_bookings_steps.rb" + - "features/step_definitions/schools/placement_dates/placement_date_steps.rb" + - "features/step_definitions/schools/placement_request_steps.rb" + - "features/step_definitions/schools/placement_requests/accept_steps.rb" + - "features/step_definitions/schools/previous_bookings_steps.rb" + - "spec/models/bookings/data/school_mass_importer_spec.rb" + +# Offense count: 6 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowedReceivers. +# AllowedReceivers: Thread.current +Style/HashEachMethods: + Exclude: + - "lib/notify/notify_sync.rb" + - "spec/models/schools/attendance_spec.rb" + - "spec/services/candidates/registrations/registration_as_placement_request_spec.rb" + - "spec/support/notify_email_shared_examples.rb" + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantParentheses: + Exclude: + - "app/services/bookings/gitis/school_experience.rb" + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantRegexpEscape: + Exclude: + - "app/models/bookings/data/school_mass_importer.rb" + - "lib/notify/notify_sync.rb"