Skip to content

refactor: split out `ErrorReport`

@tarapigott has been doing some work on AEP meets recently, which tend to not report accents on names properly (or they get lost somewhere in the process). This means you end up with a big wall of messages from the checker telling you that there are mismatched names.

Ideally, we should be able to "accept" the result of the checker and let it fix things automatically for us. This might also be useful for when the meet has incorrectly reported the totals and they don't add up, allowing checker to update them itself on /dev.

The first stage of this is to refactor some of the existing code. Errors and warnings are handled as 2 separate variables in most places and we'll likely need to add another one for "fixable errors". We should start by making a single type to store all this information.

Note: this should be a no-op change hopefully, it just moves where we are storing the data.

This change:

  • Adds an ErrorReport type, containing the number of warnings and errors
  • Begins using it in the checker

Merge request reports