Skip to content

Commit

Permalink
Exclude files from cop
Browse files Browse the repository at this point in the history
NATIONALITIES is an array not a hash
  • Loading branch information
avinhurry committed Jan 23, 2025
1 parent e0d743e commit 5d35ac9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ Rails/HelperInstanceVariable:
Exclude:
- 'app/helpers/content_helper.rb'
- 'app/helpers/view_helper.rb'
Style/HashSlice:
Exclude:
- 'app/queries/get_unsubmitted_applications_ready_to_nudge.rb' # NATIONALITIES is an array not a hash
- 'app/queries/get_incomplete_reference_applications_ready_to_nudge.rb' # NATIONALITIES is an array not a hash
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class GetIncompleteReferenceApplicationsReadyToNudge
end

def call
uk_and_irish_names = NATIONALITIES.slice(*ApplicationForm::BRITISH_OR_IRISH_NATIONALITIES).map(&:second)
uk_and_irish_names = NATIONALITIES.select do |code, _name|
code.in?(ApplicationForm::BRITISH_OR_IRISH_NATIONALITIES)
end.map(&:second)

ApplicationForm
# Only candidates with application_choices
Expand Down
4 changes: 3 additions & 1 deletion app/queries/get_unsubmitted_applications_ready_to_nudge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ class GetUnsubmittedApplicationsReadyToNudge
.map { |field| "#{field}_completed" }.freeze

def call
uk_and_irish_names = NATIONALITIES.slice(*ApplicationForm::BRITISH_OR_IRISH_NATIONALITIES).map(&:second)
uk_and_irish_names = NATIONALITIES.select do |code, _name|
code.in?(ApplicationForm::BRITISH_OR_IRISH_NATIONALITIES)
end.map(&:second)

ApplicationForm
# Only candidates with unsubmitted application_choices
Expand Down

0 comments on commit 5d35ac9

Please sign in to comment.