Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Rubocop/Rails 2 #20333

Merged
merged 8 commits into from
Jan 17, 2025
Merged

Fix Rubocop/Rails 2 #20333

merged 8 commits into from
Jan 17, 2025

Conversation

ryan-mcneil
Copy link
Contributor

@ryan-mcneil ryan-mcneil commented Jan 16, 2025

Summary

  • Fixes the following Rubocop offenses:
    • Rails/FilePath
      • Rails/FilePath: Prefer Rails.root.join('path', 'to')
    • Rails/IgnoredColumnsAssignment
      • Use += instead of =
    • Rails/Pluck
      • Prefer pluck('confirmationCode') over map { |doc| doc['confirmationCode'] }
    • Rails/RedundantPresenceValidationOnBelongsTo
      • Remove redundant presence validation with belongs to
    • Rails/RootPathnameMethods
      • Rails/RootPathnameMethods: Rails.root is a Pathname, so you can use Rails.root.join(...).read`

Related issue(s)

@ryan-mcneil ryan-mcneil changed the title Fix Rails/FilePath Fix Rubocop/Rails 2 Jan 16, 2025
@va-vfs-bot va-vfs-bot temporarily deployed to rm-fix-rubocop-rails-2/main/main January 16, 2025 20:58 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to rm-fix-rubocop-rails-2/main/main January 16, 2025 21:19 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to rm-fix-rubocop-rails-2/main/main January 16, 2025 21:39 Inactive
Copy link

github-actions bot commented Jan 16, 2025

1 Error
🚫 This PR changes 707 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, those exceeding
500 will not be reviewed, nor will they be allowed to merge. Please break this PR up into
smaller ones.

If you have reason to believe that this PR should be granted an exception, please see the
Submitting pull requests for approval - FAQ.

File Summary

Files

  • .rubocop_todo.yml (+0/-59)

  • app/models/account_login_stat.rb (+1/-1)

  • app/models/appeal_submission_upload.rb (+1/-1)

  • app/models/central_mail_submission.rb (+0/-1)

  • app/models/deprecated_user_account.rb (+0/-2)

  • app/models/education_benefits_submission.rb (+1/-1)

  • app/models/mhv_opt_in_flag.rb (+1/-1)

  • app/models/saved_claim/coe_claim.rb (+1/-1)

  • app/models/saved_claim/dependency_claim.rb (+1/-1)

  • app/services/medical_copays/zero_balance_statements.rb (+1/-1)

  • config/initializers/flipper.rb (+1/-1)

  • lib/decision_review/schemas.rb (+5/-5)

  • lib/decision_review/utilities/pdf_validation/service.rb (+1/-1)

  • lib/webhooks/utilities.rb (+2/-4)

  • modules/appeals_api/app/models/appeals_api/notice_of_disagreement.rb (+1/-1)

  • modules/appeals_api/spec/support/schema_helpers.rb (+9/-11)

  • modules/claims_api/app/models/claims_api/supporting_document.rb (+0/-1)

  • modules/claims_api/spec/requests/v2/veterans/rswag_intent_to_file_request_spec.rb (+24/-34)

  • modules/claims_api/spec/requests/v2/veterans/rswag_power_of_attorney_spec.rb (+25/-25)

  • modules/claims_api/spec/support/swagger_shared_components/v1.rb (+6/-18)

  • modules/claims_api/spec/support/swagger_shared_components/v2.rb (+161/-199)

  • modules/dhp_connected_devices/app/models/veteran_device_record.rb (+1/-1)

  • modules/dhp_connected_devices/app/services/token_storage_service.rb (+1/-1)

  • modules/health_quest/app/services/health_quest/questionnaire_manager/questionnaire_formatter.rb (+1/-1)

  • modules/mobile/lib/scripts/appointments_list_validation.rb (+1/-1)

  • modules/mobile/spec/models/adapters/appointments_vaos_v2_adapter_spec.rb (+1/-1)

  • modules/test_user_dashboard/app/models/test_user_dashboard/tud_account.rb (+1/-1)

  • rakelib/connectivity.rake (+1/-1)

  • rakelib/decision_review_repl.rb (+2/-2)

  • spec/factories/health_care_application.rb (+1/-3)

  • spec/factories/va0994.rb (+4/-4)

  • spec/factories/va10203.rb (+1/-1)

  • spec/factories/va1990s.rb (+2/-2)

  • spec/factories/va1995.rb (+11/-13)

  • spec/lib/decision_review/schemas_spec.rb (+1/-1)

  • spec/lib/decision_review/service_spec.rb (+2/-4)

  • spec/lib/hca/enrollment_system_spec.rb (+1/-3)

  • spec/models/deprecated_user_account_spec.rb (+2/-2)

  • spec/models/form_profile_spec.rb (+2/-2)

  • spec/requests/swagger_spec.rb (+3/-9)

  • spec/sidekiq/evss/document_upload_spec.rb (+1/-1)

  • spec/support/request_helper.rb (+1/-1)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, *.md, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/, *.bru, *.pdf
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@va-vfs-bot va-vfs-bot temporarily deployed to rm-fix-rubocop-rails-2/main/main January 16, 2025 22:10 Inactive
@ryan-mcneil ryan-mcneil marked this pull request as ready for review January 16, 2025 22:22
@ryan-mcneil ryan-mcneil requested review from a team as code owners January 16, 2025 22:22
@ryan-mcneil ryan-mcneil merged commit 4004b47 into master Jan 17, 2025
14 of 15 checks passed
@ryan-mcneil ryan-mcneil deleted the rm-fix-rubocop-rails-2 branch January 17, 2025 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants