Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,12 @@ Lint/RaiseException:
Lint/RandOne:
Enabled: true

Lint/RedundantCopDisableDirective:
Enabled: true

Lint/RedundantCopEnableDirective:
Enabled: true

Lint/RedundantRequireStatement:
Enabled: true

Expand Down
2 changes: 0 additions & 2 deletions app/helpers/form_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module FormHelper
# rubocop:disable Style/WordArray
# This method is single statement spread across many lines for readability
def us_states_territories
[
Expand Down Expand Up @@ -65,7 +64,6 @@ def us_states_territories
['Wyoming', 'WY'],
]
end
# rubocop:enable Style/WordArray

private

Expand Down
2 changes: 0 additions & 2 deletions app/services/attribute_asserter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def initialize(user:,
self.user_session = user_session
end

# rubocop:disable Metrics/PerceivedComplexity
def build
attrs = default_attrs
add_email(attrs) if bundle.include? :email
Expand All @@ -42,7 +41,6 @@ def build
add_x509(attrs) if bundle.include?(:x509_presented) && x509_data
user.asserted_attributes = attrs
end
# rubocop:enable Metrics/PerceivedComplexity

private

Expand Down
3 changes: 0 additions & 3 deletions app/services/doc_auth/error_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def initialize(config)
'Visible Photo Characteristics': { type: FRONT, msg_key: Errors::VISIBLE_PHOTO_CHECK },
}.freeze

# rubocop:disable Metrics/PerceivedComplexity
def generate_doc_auth_errors(response_info)
liveness_enabled = response_info[:liveness_enabled]
alert_error_count = response_info[:alert_failure_count]
Expand Down Expand Up @@ -95,8 +94,6 @@ def generate_doc_auth_errors(response_info)

errors.transform_values(&:to_a)
end
# rubocop:enable Metrics/PerceivedComplexity

# private

def get_image_metric_errors(processed_image_metrics)
Expand Down
2 changes: 0 additions & 2 deletions app/services/doc_auth/mock/doc_auth_mock_client.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# rubocop:disable Lint/UnusedMethodArgument
module DocAuth
module Mock
class DocAuthMockClient
Expand Down Expand Up @@ -124,4 +123,3 @@ def mocked_response_for_method(method_name)
end
end
end
# rubocop:enable Lint/UnusedMethodArgument
2 changes: 1 addition & 1 deletion app/services/encryption/multi_region_kms_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def resolve_decryption(ciphertext)
# checking if it looks like the JSON hash we want
if ciphertext.start_with?('{"regions"')
parsed_payload = JSON.parse(ciphertext)
if parsed_payload.is_a?(Hash) # rubocop:disable Style/GuardClause
if parsed_payload.is_a?(Hash)
regions = parsed_payload['regions']
resolve_region_decryption(regions)
else
Expand Down
1 change: 0 additions & 1 deletion lib/telephony/pinpoint/sms_sender.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ def build_response(pinpoint_response, start:, finish:)
},
)
end
# rubocop:enable Metrics/MethodLength

def success?(message_response_result)
message_response_result.delivery_status == 'SUCCESSFUL'
Expand Down
6 changes: 0 additions & 6 deletions spec/features/idv/doc_auth/verify_step_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,11 @@
success: true, errors: {}, context: { stages: [] },
)

# rubocop:disable Layout/LineLength
stub_const(
'Idv::Steps::VerifyBaseStep::AAMVA_SUPPORTED_JURISDICTIONS',
Idv::Steps::VerifyBaseStep::AAMVA_SUPPORTED_JURISDICTIONS +
[DocAuth::Mock::ResultResponseBuilder::DEFAULT_PII_FROM_DOC[:state_id_jurisdiction]],
)
# rubocop:enable Layout/LineLength

sign_in_and_2fa_user
complete_doc_auth_steps_before_verify_step
click_idv_continue
Expand All @@ -195,14 +192,11 @@
success: true, errors: {}, context: { stages: [] },
)

# rubocop:disable Layout/LineLength
stub_const(
'Idv::Steps::VerifyBaseStep::AAMVA_SUPPORTED_JURISDICTIONS',
Idv::Steps::VerifyBaseStep::AAMVA_SUPPORTED_JURISDICTIONS -
[DocAuth::Mock::ResultResponseBuilder::DEFAULT_PII_FROM_DOC[:state_id_jurisdiction]],
)
# rubocop:enable Layout/LineLength

sign_in_and_2fa_user
complete_doc_auth_steps_before_verify_step
click_idv_continue
Expand Down
3 changes: 0 additions & 3 deletions spec/services/proofing/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,10 @@ def hello(applicant, results)
subject { impl.new.proof(applicant) }

it 'does not affect the other proofer' do
# rubocop:disable Lint/UselessAssignment
# This is an explicit check for class-level side effects
impl2 = Class.new(Proofing::Base) do
required_attributes :foobarbaz
end
# rubocop:enable Lint/UselessAssignment

expect(subject.exception?).to eq(false)
expect(subject.failed?).to eq(false)
expect(subject.success?).to eq(true)
Expand Down
2 changes: 0 additions & 2 deletions spec/support/acuant_fixtures.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# rubocop:disable Naming/AccessorMethodName
module AcuantFixtures
def self.create_document_response
load_response_fixture('create_document_response.json')
Expand Down Expand Up @@ -45,4 +44,3 @@ def self.load_response_fixture(filename)
File.read(path)
end
end
# rubocop:enable Naming/AccessorMethodName