From 09a01314479f904f69f6ea53281138d671a9cfcd Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 29 Oct 2021 09:14:40 -0400 Subject: [PATCH 1/2] Expand ERBLint exclusion glob patterns **Why**: * More straight-forward to fix individual files * Avoid allowing new files to be exempt by virtue of matching glob pattern * Some files matching these patterns are already correct (e.g. `app/views/users/verify_personal_key/throttled.html.erb` ) --- .erb-lint.yml | 102 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 76 insertions(+), 26 deletions(-) diff --git a/.erb-lint.yml b/.erb-lint.yml index 03811f95088..ceef205fca4 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -5,7 +5,13 @@ linters: # There's no special reason for these excludes other than the fact that they have existing # issues that haven't been resolved yet. Fix 'em up! exclude: - - '*/app/views/account_reset/*' + - '*/app/views/account_reset/cancel/show.html.erb' + - '*/app/views/account_reset/confirm_delete_account/show.html.erb' + - '*/app/views/account_reset/delete_account/show.html.erb' + - '*/app/views/account_reset/pending/cancel.html.erb' + - '*/app/views/account_reset/pending/confirm.html.erb' + - '*/app/views/account_reset/pending/show.html.erb' + - '*/app/views/account_reset/request/show.html.erb' - '*/app/views/accounts/_auth_apps.html.erb' - '*/app/views/accounts/_backup_codes.html.erb' - '*/app/views/accounts/_connected_app.html.erb' @@ -16,8 +22,9 @@ linters: - '*/app/views/accounts/_webauthn.html.erb' - '*/app/views/accounts/actions/_manage_personal_key.html.erb' - '*/app/views/accounts/show.html.erb' - - '*/app/views/idv/confirmations/*' - - '*/app/views/idv/capture_doc/*' + - '*/app/views/event_disavowal/new.html.erb' + - '*/app/views/idv/capture_doc/document_capture.html.erb' + - '*/app/views/idv/confirmations/show.html.erb' - '*/app/views/idv/doc_auth/_back.html.erb' - '*/app/views/idv/doc_auth/_error_messages.html.erb' - '*/app/views/idv/doc_auth/_ssn_init.html.erb' @@ -30,32 +37,75 @@ linters: - '*/app/views/idv/doc_auth/verify.html.erb' - '*/app/views/idv/doc_auth/verify_wait.html.erb' - '*/app/views/idv/phone/new.html.erb' + - '*/app/views/mfa_confirmation/new.html.erb' + - '*/app/views/two_factor_authentication/backup_code_verification/show.html.erb' + - '*/app/views/two_factor_authentication/options/index.html.erb' + - '*/app/views/two_factor_authentication/otp_verification/show.html.erb' + - '*/app/views/two_factor_authentication/personal_key_verification/show.html.erb' + - '*/app/views/two_factor_authentication/totp_verification/show.html.erb' + - '*/app/views/two_factor_authentication/webauthn_verification/show.html.erb' - '*/app/views/idv/shared/_document_capture.html.erb' - - '*/app/views/event_disavowal/*' - - '*/app/views/mfa_confirmation/*' - - '*/app/views/reactivate_account/*' - - '*/app/views/session_timeout/*' - - '*/app/views/shared/*' - - '*/app/views/two_factor_authentication/*' - - '*/app/views/user_mailer/*' - - '*/app/views/users/authorization_confirmation/*' - - '*/app/views/users/backup_code_setup/*' - - '*/app/views/users/delete/*' - - '*/app/views/users/edit_phone/*' - - '*/app/views/users/email_language/*' - - '*/app/views/users/emails/*' - - '*/app/views/users/passwords/*' - - '*/app/views/users/piv_cac_setup/*' - - '*/app/views/users/piv_cac_setup_from_sign_in/*' - - '*/app/views/users/rules_of_use/*' - - '*/app/views/users/service_provider_inactive/*' - - '*/app/views/users/service_provider_revoke/*' + - '*/app/views/reactivate_account/_modal.html.erb' + - '*/app/views/reactivate_account/index.html.erb' + - '*/app/views/session_timeout/_expire_session.html.erb' + - '*/app/views/session_timeout/_ping.html.erb' + - '*/app/views/shared/_alert.html.erb' + - '*/app/views/shared/_banner.html.erb' + - '*/app/views/shared/_block_link.html.erb' + - '*/app/views/shared/_email_languages.html.erb' + - '*/app/views/shared/_flashes.html.erb' + - '*/app/views/shared/_footer_lite.html.erb' + - '*/app/views/shared/_maintenance_window_alert.html.erb' + - '*/app/views/shared/_masked_text.html.erb' + - '*/app/views/shared/_nav_branded.html.erb' + - '*/app/views/shared/_one_time_code_input.html.erb' + - '*/app/views/shared/_personal_key.html.erb' + - '*/app/views/shared/_personal_key_confirmation_modal.html.erb' + - '*/app/views/shared/_spinner_button.html.erb' + - '*/app/views/shared/_ssn_field.html.erb' + - '*/app/views/shared/_step_indicator.html.erb' + - '*/app/views/shared/_step_indicator_step.html.erb' + - '*/app/views/shared/_validation_message.html.erb' + - '*/app/views/user_mailer/account_does_not_exist.html.erb' + - '*/app/views/user_mailer/account_reset_granted.html.erb' + - '*/app/views/user_mailer/account_verified.html.erb' + - '*/app/views/user_mailer/add_email.html.erb' + - '*/app/views/user_mailer/add_email_associated_with_another_account.html.erb' + - '*/app/views/user_mailer/email_added.html.erb' + - '*/app/views/user_mailer/email_confirmation_instructions.html.erb' + - '*/app/views/user_mailer/email_deleted.html.erb' + - '*/app/views/user_mailer/new_device_sign_in.html.erb' + - '*/app/views/user_mailer/password_changed.html.erb' + - '*/app/views/user_mailer/personal_key_regenerated.html.erb' + - '*/app/views/user_mailer/personal_key_sign_in.html.erb' + - '*/app/views/user_mailer/phone_added.html.erb' + - '*/app/views/user_mailer/please_reset_password.html.erb' + - '*/app/views/user_mailer/reset_password_instructions.html.erb' + - '*/app/views/user_mailer/signup_with_your_email.html.erb' + - '*/app/views/user_mailer/unconfirmed_email_instructions.html.erb' + - '*/app/views/users/authorization_confirmation/show.html.erb' + - '*/app/views/users/backup_code_setup/confirm_delete.html.erb' + - '*/app/views/users/backup_code_setup/create.html.erb' + - '*/app/views/users/backup_code_setup/edit.html.erb' + - '*/app/views/users/backup_code_setup/index.html.erb' + - '*/app/views/users/delete/show.html.erb' + - '*/app/views/users/edit_phone/edit.html.erb' + - '*/app/views/users/email_language/show.html.erb' + - '*/app/views/users/emails/show.html.erb' + - '*/app/views/users/emails/verify.html.erb' + - '*/app/views/users/passwords/edit.html.erb' + - '*/app/views/users/piv_cac_setup_from_sign_in/prompt.html.erb' + - '*/app/views/users/piv_cac_setup_from_sign_in/success.html.erb' + - '*/app/views/users/rules_of_use/new.html.erb' + - '*/app/views/users/service_provider_inactive/index.html.erb' + - '*/app/views/users/service_provider_revoke/show.html.erb' - '*/app/views/users/shared/_otp_delivery_preference_selection.html.erb' - '*/app/views/users/shared/_otp_make_default_number.html.erb' - - '*/app/views/users/totp_setup/*' - - '*/app/views/users/verify_password/*' - - '*/app/views/users/verify_personal_key/*' - - '*/app/views/users/webauthn_setup/*' + - '*/app/views/users/totp_setup/new.html.erb' + - '*/app/views/users/verify_password/new.html.erb' + - '*/app/views/users/verify_personal_key/new.html.erb' + - '*/app/views/users/webauthn_setup/delete.html.erb' + - '*/app/views/users/webauthn_setup/new.html.erb' rubocop_config: inherit_from: - .rubocop.yml From 3d1778c8d5d03695468da9d115dfb65e011f237f Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 29 Oct 2021 09:18:08 -0400 Subject: [PATCH 2/2] sort --- .erb-lint.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.erb-lint.yml b/.erb-lint.yml index ceef205fca4..8970f401e18 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -37,14 +37,8 @@ linters: - '*/app/views/idv/doc_auth/verify.html.erb' - '*/app/views/idv/doc_auth/verify_wait.html.erb' - '*/app/views/idv/phone/new.html.erb' - - '*/app/views/mfa_confirmation/new.html.erb' - - '*/app/views/two_factor_authentication/backup_code_verification/show.html.erb' - - '*/app/views/two_factor_authentication/options/index.html.erb' - - '*/app/views/two_factor_authentication/otp_verification/show.html.erb' - - '*/app/views/two_factor_authentication/personal_key_verification/show.html.erb' - - '*/app/views/two_factor_authentication/totp_verification/show.html.erb' - - '*/app/views/two_factor_authentication/webauthn_verification/show.html.erb' - '*/app/views/idv/shared/_document_capture.html.erb' + - '*/app/views/mfa_confirmation/new.html.erb' - '*/app/views/reactivate_account/_modal.html.erb' - '*/app/views/reactivate_account/index.html.erb' - '*/app/views/session_timeout/_expire_session.html.erb' @@ -66,6 +60,12 @@ linters: - '*/app/views/shared/_step_indicator.html.erb' - '*/app/views/shared/_step_indicator_step.html.erb' - '*/app/views/shared/_validation_message.html.erb' + - '*/app/views/two_factor_authentication/backup_code_verification/show.html.erb' + - '*/app/views/two_factor_authentication/options/index.html.erb' + - '*/app/views/two_factor_authentication/otp_verification/show.html.erb' + - '*/app/views/two_factor_authentication/personal_key_verification/show.html.erb' + - '*/app/views/two_factor_authentication/totp_verification/show.html.erb' + - '*/app/views/two_factor_authentication/webauthn_verification/show.html.erb' - '*/app/views/user_mailer/account_does_not_exist.html.erb' - '*/app/views/user_mailer/account_reset_granted.html.erb' - '*/app/views/user_mailer/account_verified.html.erb'