From ccde9c37d8d50289c81eec190ecbd2a7f20e8d95 Mon Sep 17 00:00:00 2001 From: compwron Date: Mon, 11 Mar 2024 22:02:30 -0700 Subject: [PATCH] lintr --- lib/tasks/lint_factory_bot.rake | 44 ++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/lib/tasks/lint_factory_bot.rake b/lib/tasks/lint_factory_bot.rake index b1097e3c60..e810f11edf 100644 --- a/lib/tasks/lint_factory_bot.rake +++ b/lib/tasks/lint_factory_bot.rake @@ -5,29 +5,29 @@ namespace :factory_bot do puts "linting factory_bot factories for being rails valid objects" conn = ActiveRecord::Base.connection invalid_factories = [ - # * casa_admin+with_casa_cases - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * casa_admin+with_case_contact - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * casa_admin+with_case_contact_wants_driving_reimbursement - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * casa_admin+with_casa_cases - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * casa_admin+with_single_case - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * casa_admin+with_case_contact - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * casa_admin+with_case_contact_wants_driving_reimbursement - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - :casa_admin, + # * casa_admin+with_casa_cases - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * casa_admin+with_case_contact - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * casa_admin+with_case_contact_wants_driving_reimbursement - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * casa_admin+with_casa_cases - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * casa_admin+with_single_case - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * casa_admin+with_case_contact - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * casa_admin+with_case_contact_wants_driving_reimbursement - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + :casa_admin, - # * supervisor+with_casa_cases - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * supervisor+with_case_contact - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * supervisor+with_case_contact_wants_driving_reimbursement - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * supervisor+with_casa_cases - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * supervisor+with_single_case - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * supervisor+with_case_contact - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * supervisor+with_case_contact_wants_driving_reimbursement - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - :supervisor, + # * supervisor+with_casa_cases - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * supervisor+with_case_contact - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * supervisor+with_case_contact_wants_driving_reimbursement - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * supervisor+with_casa_cases - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * supervisor+with_single_case - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * supervisor+with_case_contact - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * supervisor+with_case_contact_wants_driving_reimbursement - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + :supervisor, - # * user+with_casa_cases - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * user+with_single_case - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * user+with_case_contact - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - # * user+with_case_contact_wants_driving_reimbursement - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) - :user + # * user+with_casa_cases - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * user+with_single_case - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * user+with_case_contact - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + # * user+with_case_contact_wants_driving_reimbursement - Validation failed: Volunteer Case assignee must be an active volunteer (ActiveRecord::RecordInvalid) + :user ] raise "a suspiciously low number of FactoryBot factories" if FactoryBot.factories.count < 50 factories_to_lint = FactoryBot.factories.reject do |factory| @@ -42,4 +42,4 @@ namespace :factory_bot do raise if $?.exitstatus.nonzero? end end -end \ No newline at end of file +end