Skip to content

Commit 081e082

Browse files
authored
Fix Rubocop/Layout (#20259)
* Fix Rubocop/Layout * Codeowners
1 parent 2f6ad9f commit 081e082

File tree

35 files changed

+203
-246
lines changed

35 files changed

+203
-246
lines changed

.github/CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -1355,6 +1355,9 @@ spec/sidekiq/central_mail/submit_career_counseling_job_spec.rb @department-of-ve
13551355
spec/sidekiq/central_mail/submit_form4142_job_spec.rb @department-of-veterans-affairs/backend-review-group
13561356
spec/sidekiq/central_mail/submit_central_form686c_job_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/benefits-dependents-management
13571357
spec/sidekiq/copay_notifications @department-of-veterans-affairs/vsa-debt-resolution @department-of-veterans-affairs/backend-review-group
1358+
spec/sidekiq/cypress_viewport_updater/cypress_config_js_file_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
1359+
spec/sidekiq/cypress_viewport_updater/github_service_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
1360+
spec/sidekiq/cypress_viewport_updater/viewport_preset_js_file_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
13581361
spec/sidekiq/decision_review @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
13591362
spec/sidekiq/education_form @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
13601363
spec/sidekiq/education_form/create_daily_spool_files.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/govcio-vfep-codereviewers

.rubocop_todo.yml

-46
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,6 @@
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 2
10-
# This cop supports safe autocorrection (--autocorrect).
11-
Layout/EmptyLinesAroundExceptionHandlingKeywords:
12-
Exclude:
13-
- 'spec/controllers/v0/virtual_agent/virtual_agent_claim_spec.rb'
14-
15-
# Offense count: 200
16-
# This cop supports safe autocorrection (--autocorrect).
17-
# Configuration parameters: EnforcedStyle.
18-
# SupportedStyles: space, no_space
19-
Layout/LineContinuationSpacing:
20-
Exclude:
21-
- 'app/controllers/v1/sessions_controller.rb'
22-
- 'app/models/in_progress_form.rb'
23-
- 'app/sidekiq/cypress_viewport_updater/viewport.rb'
24-
- 'app/sidekiq/form1095/new1095_bs_job.rb'
25-
- 'app/swagger/swagger/requests/health_care_applications.rb'
26-
- 'app/swagger/swagger/requests/profile.rb'
27-
- 'app/swagger/swagger/requests/user.rb'
28-
- 'lib/evss/disability_compensation_form/data_translation_all_claim.rb'
29-
- 'lib/generators/module_component/module_component_generator.rb'
30-
- 'modules/appeals_api/app/swagger/appeals_api/v1/notice_of_disagreements_controller_swagger.rb'
31-
- 'modules/appeals_api/spec/docs/decision_reviews/higher_level_reviews_spec.rb'
32-
- 'modules/claims_api/app/controllers/concerns/claims_api/disability_compensation_validations.rb'
33-
- 'modules/claims_api/app/controllers/concerns/claims_api/poa_verification.rb'
34-
- 'modules/claims_api/app/sidekiq/claims_api/poa_vbms_updater.rb'
35-
- 'modules/mobile/spec/services/lighthouse_health_service_spec.rb'
36-
- 'modules/vba_documents/lib/vba_documents/upload_validator.rb'
37-
- 'spec/controllers/v1/sessions_controller_spec.rb'
38-
- 'spec/factories/saml_attributes.rb'
39-
- 'spec/lib/bgs/form686c_spec.rb'
40-
- 'spec/lib/evss/disability_compensation_form/data_translation_all_claim_spec.rb'
41-
- 'spec/lib/iam_ssoe_oauth/service_spec.rb'
42-
- 'spec/lib/saml/post_url_service_spec.rb'
43-
- 'spec/lib/saml/responses/login_spec.rb'
44-
- 'spec/lib/saml/ssoe_user_spec.rb'
45-
- 'spec/lib/saml/url_service_spec.rb'
46-
- 'spec/mailers/direct_deposit_mailer_spec.rb'
47-
- 'spec/models/async_transaction/va_profile/base_spec.rb'
48-
- 'spec/models/user_session_form_spec.rb'
49-
- 'spec/rakelib/vet360_spec.rb'
50-
- 'spec/sidekiq/cypress_viewport_updater/cypress_config_js_file_spec.rb'
51-
- 'spec/sidekiq/cypress_viewport_updater/github_service_spec.rb'
52-
- 'spec/sidekiq/cypress_viewport_updater/viewport_preset_js_file_spec.rb'
53-
- 'spec/support/saml/response_builder.rb'
54-
559
# Offense count: 38
5610
# This cop supports safe autocorrection (--autocorrect).
5711
Lint/AmbiguousOperatorPrecedence:

app/controllers/v1/sessions_controller.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,10 @@ def user_logout(saml_response)
307307
logout_request = SingleLogoutRequest.find(saml_response&.in_response_to)
308308
if logout_request.present?
309309
logout_request.destroy
310-
Rails.logger.info("SLO callback response to '#{saml_response&.in_response_to}' for originating_request_id "\
310+
Rails.logger.info("SLO callback response to '#{saml_response&.in_response_to}' for originating_request_id " \
311311
"'#{originating_request_id}'")
312312
else
313-
Rails.logger.info('SLO callback response could not resolve logout request for originating_request_id '\
313+
Rails.logger.info('SLO callback response could not resolve logout request for originating_request_id ' \
314314
"'#{originating_request_id}'")
315315
end
316316
end

app/models/in_progress_form.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ def cast(value)
2525
scope :submission_pending, -> { where(status: [nil, 'pending']) } # override to include nil
2626

2727
scope :has_attempted_submit, lambda {
28-
where("(metadata -> 'submission' ->> 'hasAttemptedSubmit')::boolean or "\
28+
where("(metadata -> 'submission' ->> 'hasAttemptedSubmit')::boolean or " \
2929
"(metadata -> 'submission' ->> 'has_attempted_submit')::boolean")
3030
}
3131
scope :has_errors, -> { where("(metadata -> 'submission' -> 'errors') IS NOT NULL") }
3232
scope :has_no_errors, -> { where.not("(metadata -> 'submission' -> 'errors') IS NOT NULL") }
3333
scope :has_error_message, lambda {
34-
where("(metadata -> 'submission' -> 'errorMessage')::text !='false' or "\
34+
where("(metadata -> 'submission' -> 'errorMessage')::text !='false' or " \
3535
"(metadata -> 'submission' -> 'error_message')::text !='false' ")
3636
}
3737
# the double quotes in return_url are part of the value

app/sidekiq/cypress_viewport_updater/viewport.rb

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ class Viewport
55
DEVICES = {
66
'1920x1080' => 'Microsoft Windows RT Tablet',
77
'1280x720' => 'Microsoft Windows RT Tablet',
8-
'1024x1366' => 'iPad Pro (1st gen 12.9"), '\
9-
'iPad Pro (2nd gen 12.9"), '\
8+
'1024x1366' => 'iPad Pro (1st gen 12.9"), ' \
9+
'iPad Pro (2nd gen 12.9"), ' \
1010
'iPad Pro (3rd gen 12.9"), iPad Pro (4th gen 12.9")',
1111
'834x1194' => 'iPad Pro (3rd gen 11"), iPad Pro (4th gen 11")',
1212
'810x1080' => 'iPad 7th gen',
13-
'800x1280' => 'Amazon KSFUWI Fire HD 10 (2017), '\
14-
'Amazon KFMAWI Fire HD 10 (2019), '\
15-
'Samsung SM-T580 Galaxy Tab A 10.1, '\
16-
'Samsung SM-T510 Galaxy Tab A 10.1 (2019), '\
13+
'800x1280' => 'Amazon KSFUWI Fire HD 10 (2017), ' \
14+
'Amazon KFMAWI Fire HD 10 (2019), ' \
15+
'Samsung SM-T580 Galaxy Tab A 10.1, ' \
16+
'Samsung SM-T510 Galaxy Tab A 10.1 (2019), ' \
1717
'Samsung SM-T560NU Galaxy Tab E',
1818
'768x1024' => 'iPad 1-6, iPad mini, iPad Air 1-2, iPad Pro (1st gen 9.7")',
19-
'601x962' => 'Amazon KFGIWI Kindle Fire HD 8 2016, '\
20-
'Amazon KFDOWI Kindle Fire HD 8 (2017), '\
21-
'Amazon KFKAWI Fire HD 8 (2018), '\
19+
'601x962' => 'Amazon KFGIWI Kindle Fire HD 8 2016, ' \
20+
'Amazon KFDOWI Kindle Fire HD 8 (2017), ' \
21+
'Amazon KFKAWI Fire HD 8 (2018), ' \
2222
'Amazon KFKAWI Fire HD 8 (2018)',
2323
'428x926' => 'iPhone 12 Pro Max',
2424
'414x896' => 'iPhone XS Max, iPhone XR, iPhone 11, iPhone 11 Pro Max',
@@ -70,7 +70,7 @@ def device_list(device:, resolution:)
7070
return 'This property is not set for desktops.' if device == 'desktop'
7171

7272
DEVICES[resolution] ||
73-
'This viewport is missing from the devices lookup table. '\
73+
'This viewport is missing from the devices lookup table. ' \
7474
'Please contact the Testing Tools Team to have it added.'
7575
end
7676

app/sidekiq/form1095/new1095_bs_job.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def perform
211211
Rails.logger.info "Successfully read #{@form_count} 1095B forms from #{file_name}, deleting file from S3"
212212
bucket.delete_objects(delete: { objects: [{ key: file_name }] })
213213
else
214-
Rails.logger.error "failed to save #{@error_count} forms from file: #{file_name};"\
214+
Rails.logger.error "failed to save #{@error_count} forms from file: #{file_name};" \
215215
" successfully saved #{@form_count} forms"
216216
end
217217
end

app/swagger/swagger/requests/health_care_applications.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ class HealthCareApplications
101101

102102
swagger_path '/v0/health_care_applications/enrollment_status' do
103103
operation :get do
104-
key :description, 'Check the status of a health care application.'\
105-
' Non-logged in users must pass query parameters with user attributes.'\
104+
key :description, 'Check the status of a health care application.' \
105+
' Non-logged in users must pass query parameters with user attributes.' \
106106
' No parameters needed for logged in loa3 users.'
107107
key :operationId, 'enrollmentStatusHealthCareApplication'
108108
key :tags, %w[benefits_forms]

app/swagger/swagger/requests/profile.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -997,11 +997,11 @@ class Profile
997997
operation :get do
998998
extend Swagger::Responses::AuthenticationError
999999

1000-
key :description, 'Gets the most recent transactions for a user.'\
1001-
' Response will include an array of transactions that are still in progress,'\
1002-
' or that were just updated to COMPLETED during the course of this request.'\
1003-
' The array will be empty if no transactions are pending or updated.'\
1004-
' Only the most recent transaction for each profile field will be included'\
1000+
key :description, 'Gets the most recent transactions for a user.' \
1001+
' Response will include an array of transactions that are still in progress,' \
1002+
' or that were just updated to COMPLETED during the course of this request.' \
1003+
' The array will be empty if no transactions are pending or updated.' \
1004+
' Only the most recent transaction for each profile field will be included' \
10051005
' so there may be up to 4 (Address, Email, Telephone, Permission).'
10061006
key :operationId, 'getTransactionStatusesByUser'
10071007
key :tags, %w[profile]

app/swagger/swagger/requests/user.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ class User
104104
type: :string,
105105
enum: %w[OK DEACTIVATED MULTIPLE NONE],
106106
example: 'OK',
107-
description: 'DEACTIVATED: user has at least one MHV id that is not active; '\
108-
'NONE: user has no active MHV ids; '\
109-
'MULTIPLE: user has multiple active MHV ids; '\
107+
description: 'DEACTIVATED: user has at least one MHV id that is not active; ' \
108+
'NONE: user has no active MHV ids; ' \
109+
'MULTIPLE: user has multiple active MHV ids; ' \
110110
'OK: user has one MHV id and its active'
111111
end
112112
property :veteran_status, type: :object do

lib/evss/disability_compensation_form/data_translation_all_claim.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ def map_new(input_disability)
629629
'classificationCode' => input_disability['classificationCode'],
630630
'disabilityActionType' => 'NEW',
631631
'specialIssues' => input_disability['specialIssues'].presence,
632-
'serviceRelevance' => "Caused by an in-service event, injury, or exposure\n"\
632+
'serviceRelevance' => "Caused by an in-service event, injury, or exposure\n" \
633633
"#{input_disability['primaryDescription']}"
634634
}.compact
635635
end
@@ -649,7 +649,7 @@ def map_worsened(input_disability)
649649
'classificationCode' => input_disability['classificationCode'],
650650
'disabilityActionType' => 'NEW',
651651
'specialIssues' => input_disability['specialIssues'].presence,
652-
'serviceRelevance' => "Worsened because of military service\n"\
652+
'serviceRelevance' => "Worsened because of military service\n" \
653653
"#{input_disability['worsenedDescription']}: #{input_disability['worsenedEffects']}"
654654
}.compact
655655
end
@@ -670,9 +670,9 @@ def map_va(input_disability)
670670
'classificationCode' => input_disability['classificationCode'],
671671
'disabilityActionType' => 'NEW',
672672
'specialIssues' => input_disability['specialIssues'].presence,
673-
'serviceRelevance' => "Caused by VA care\n"\
674-
"Event: #{input_disability['vaMistreatmentDescription']}\n"\
675-
"Location: #{input_disability['vaMistreatmentLocation']}\n"\
673+
'serviceRelevance' => "Caused by VA care\n" \
674+
"Event: #{input_disability['vaMistreatmentDescription']}\n" \
675+
"Location: #{input_disability['vaMistreatmentLocation']}\n" \
676676
"TimeFrame: #{input_disability['vaMistreatmentDate']}"
677677
}.compact
678678
end
@@ -692,7 +692,7 @@ def map_secondary(input_disability, disabilities)
692692
'classificationCode' => input_disability['classificationCode'],
693693
'disabilityActionType' => 'SECONDARY',
694694
'specialIssues' => input_disability['specialIssues'].presence,
695-
'serviceRelevance' => "Caused by a service-connected disability\n"\
695+
'serviceRelevance' => "Caused by a service-connected disability\n" \
696696
"#{input_disability['causedByDisabilityDescription']}"
697697
}.compact
698698

lib/generators/module_component/module_component_generator.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def create_component
3232
File.join(path, method.pluralize.to_s, file_name, 'v0', 'configuration.rb'), comp_name
3333
end
3434
else
35-
$stdout.puts "\n#{method} is not a known generator command."\
35+
$stdout.puts "\n#{method} is not a known generator command." \
3636
"Commands allowed are controller, model, serializer and service\n"
3737
end
3838
end

modules/appeals_api/app/swagger/appeals_api/v1/notice_of_disagreements_controller_swagger.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ class AppealsApi::V1::NoticeOfDisagreementsControllerSwagger
583583
property :Message do
584584
key :type, :string
585585
key :description, 'Error detail'
586-
key :example, 'A client error (InvalidDigest) occurred when calling the PutObject operation -'\
586+
key :example, 'A client error (InvalidDigest) occurred when calling the PutObject operation -' \
587587
'The Content-MD5 you specified was invalid.'
588588
end
589589

modules/appeals_api/spec/docs/decision_reviews/higher_level_reviews_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def openapi_spec
164164
tags 'Higher-Level Reviews'
165165
operationId 'hlrContestableIssues'
166166
description = 'Returns all issues associated with a Veteran that have been decided by a ' \
167-
'Higher-Level Review as of the receiptDate and bound by benefitType. Not all issues returned are guaranteed '\
167+
'Higher-Level Review as of the receiptDate and bound by benefitType. Not all issues returned are guaranteed ' \
168168
'to be eligible for appeal. Associate these results when creating a new Higher-Level Review.'
169169
description description
170170
security DocHelpers.decision_reviews_security_config

modules/claims_api/app/controllers/concerns/claims_api/disability_compensation_validations.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -236,21 +236,21 @@ def confinements_dont_overlap?(confinements)
236236
def validate_form_526_veteran_homelessness!
237237
if too_many_homelessness_attributes_provided?
238238
raise ::Common::Exceptions::UnprocessableEntity.new(
239-
detail: "Must define only one of 'veteran.homelessness.currentlyHomeless' or "\
239+
detail: "Must define only one of 'veteran.homelessness.currentlyHomeless' or " \
240240
"'veteran.homelessness.homelessnessRisk'"
241241
)
242242
end
243243

244244
if unnecessary_homelessness_point_of_contact_provided?
245245
raise ::Common::Exceptions::UnprocessableEntity.new(
246-
detail: "If 'veteran.homelessness.pointOfContact' is defined, then one of "\
246+
detail: "If 'veteran.homelessness.pointOfContact' is defined, then one of " \
247247
"'veteran.homelessness.currentlyHomeless' or 'veteran.homelessness.homelessnessRisk' is required"
248248
)
249249
end
250250

251251
if missing_point_of_contact?
252252
raise ::Common::Exceptions::UnprocessableEntity.new(
253-
detail: "If one of 'veteran.homelessness.currentlyHomeless' or 'veteran.homelessness.homelessnessRisk' is "\
253+
detail: "If one of 'veteran.homelessness.currentlyHomeless' or 'veteran.homelessness.homelessnessRisk' is " \
254254
"defined, then 'veteran.homelessness.pointOfContact' is required"
255255
)
256256
end
@@ -267,7 +267,7 @@ def validate_service_after_13th_birthday!
267267
end
268268
if started_before_age_thirteen
269269
raise ::Common::Exceptions::UnprocessableEntity.new(
270-
detail: "If any 'serviceInformation.servicePeriods.activeDutyBeginDate' is "\
270+
detail: "If any 'serviceInformation.servicePeriods.activeDutyBeginDate' is " \
271271
"before the Veteran's 13th birthdate: #{age_thirteen}, the claim can not be processed."
272272
)
273273
end

modules/claims_api/app/controllers/concerns/claims_api/poa_verification.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def validate_user_is_accredited!
4343
def validate_poa_code_for_current_user!(poa_code)
4444
return if valid_poa_code_for_current_user?(poa_code)
4545

46-
error_msg = 'Veterans making requests do not need to include identifying headers '\
46+
error_msg = 'Veterans making requests do not need to include identifying headers ' \
4747
"such as 'X-VA-First-Name'. Please resubmit without extraneous headers"
4848
raise ::Common::Exceptions::UnprocessableEntity.new(detail: error_msg) if target_veteran_is_current_user?
4949

modules/claims_api/app/sidekiq/claims_api/poa_vbms_updater.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def perform(power_of_attorney_id) # rubocop:disable Metrics/MethodLength
2828
poa_form.vbms_error_message = nil if poa_form.vbms_error_message.present?
2929
ClaimsApi::Logger.log('poa_vbms_updater', poa_id: power_of_attorney_id, detail: 'VBMS Success')
3030
else
31-
poa_form.vbms_error_message = 'update_poa_access failed with code '\
31+
poa_form.vbms_error_message = 'update_poa_access failed with code ' \
3232
"#{response[:return_code]}: #{response[:return_message]}"
3333
poa_form.status = ClaimsApi::PowerOfAttorney::ERRORED
3434
ClaimsApi::Logger.log('poa_vbms_updater',

0 commit comments

Comments
 (0)