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/Style 1 #20338

Merged
merged 9 commits into from
Jan 28, 2025
Merged

Fix Rubocop/Style 1 #20338

merged 9 commits into from
Jan 28, 2025

Conversation

ryan-mcneil
Copy link
Contributor

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

Summary

  • Fixes the following Rubocop offenses:
    • Style/CollectionCompact
      • Use compact instead of reject(&:nil?)
    • Style/ConcatArrayLiterals
      • Use push instead of concat
    • Style/FetchEnvVar
      • Use ENV.fetch('service') or ENV.fetch('service', nil) instead of ENV['service'].
    • Style/FileRead
      • Use File.read/File.binread
    • Style/FileWrite
      • Use File.write/File.binwrite

Related issue(s)

@va-vfs-bot va-vfs-bot temporarily deployed to rm-fix-rubocop-style-1/main/main January 16, 2025 23:13 Inactive
Copy link

github-actions bot commented Jan 16, 2025

1 Warning
⚠️ This PR changes 210 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

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

  • app/sidekiq/evss/disability_compensation_form/evss_document.rb (+1/-1)

  • app/sidekiq/evss/disability_compensation_form/submit_form0781.rb (+1/-1)

  • lib/common/file_helpers.rb (+2/-6)

  • lib/saml/user_attributes/ssoe.rb (+2/-2)

  • lib/sftp_writer/local.rb (+1/-3)

  • modules/claims_api/app/models/claims_api/power_of_attorney.rb (+1/-3)

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

  • modules/dhp_connected_devices/spec/services/dhp_connected_devices/token_storage_service_spec.rb (+3/-4)

  • modules/mobile/app/services/mobile/v0/claims/proxy.rb (+1/-1)

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

  • modules/vba_documents/spec/lib/multipart_parser_spec.rb (+1/-1)

  • modules/vba_documents/spec/models/upload_file_spec.rb (+1/-1)

  • modules/vba_documents/spec/sidekiq/upload_processor_spec.rb (+1/-1)

  • rakelib/breakers_outage.rake (+4/-4)

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

  • rakelib/mvi.rake (+15/-15)

  • rakelib/vet360.rake (+8/-8)

  • spec/factories/form526_submissions.rb (+27/-27)

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

  • spec/lib/tasks/support/schema_camelizer_spec.rb (+2/-2)

  • spec/rails_helper.rb (+2/-2)

  • spec/rswag_override.rb (+1/-3)

  • spec/support/rswag/text_helpers.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-style-1/main/main January 16, 2025 23:31 Inactive
@ryan-mcneil ryan-mcneil marked this pull request as ready for review January 16, 2025 23:31
@ryan-mcneil ryan-mcneil requested review from a team as code owners January 16, 2025 23:31
@ryan-mcneil ryan-mcneil requested a review from aherzberg January 16, 2025 23:31
@ryan-mcneil ryan-mcneil marked this pull request as draft January 17, 2025 00:17
@@ -63,8 +63,7 @@
end

it 'returns error when token was not stored locally' do
allow_any_instance_of(File).to receive(:write).with(any_args).and_raise(TokenStorageError)
allow_any_instance_of(File).to receive(:read).with(any_args).and_raise(TokenStorageError)
allow(File).to receive(:write).and_raise(Errno::ENOENT)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File methods don't specifically raise TokenStorageError, so I chose an error it could potentially raise (though it doesn't really matter).

@ryan-mcneil ryan-mcneil merged commit b27d806 into master Jan 28, 2025
25 checks passed
@ryan-mcneil ryan-mcneil deleted the rm-fix-rubocop-style-1 branch January 28, 2025 01:28
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