cfpb / sbl-project

Project management repo for the SBL project
Creative Commons Zero v1.0 Universal
2 stars 1 forks source link

FIG error E0841 isn't checkable due to E0840 #233

Open jcadam14 opened 4 months ago

jcadam14 commented 4 months ago

Because the check for E0840 uses an enum list of accepted values (see below), an empty field in the business_ownership_status would fail the syntax check. E0841 validates that business_ownership_status must contain at least one value, so since an empty value in this field is already caught by E0840, E0841 isn't a "reachable" check and should be removed.

Accepted values enum of E0840:

accepted_values=[
              "1",
              "2",
              "3",
              "955",
              "966",
              "988",
          ]
natalia-fitzgerald commented 1 month ago

@angelcardoz Can you advise on how you would like to handle this one? If we keep this ticket open we should probably add more context and perhaps make it into a story so that it will be tracked.

jcadam14 commented 1 month ago

Having E0841 in the code doesn't break anything, it's just a check that can't be reached due to the way E0840 was implemented. If at some point we remove the implementation of the accepted_values enum and let the field be open to any value, then E0841 would be a valid check. I don't see the need to change our implementation, but E0841 could be kept in "just in case", a safeguard for the future. But as it stands, we'll never throw E0841 so it seems unnecessary.