Mutagen-Modding / Mutagen.Bethesda.Analyzers

A project to diagnose and analyze the health of a mod or a load order
GNU General Public License v3.0
16 stars 5 forks source link

Record Format doesn't match defined FormVersion #10

Open Noggog opened 4 years ago

Noggog commented 4 years ago

Formats change with FormVersion. Some binary structures are valid, but only relative to a certain version number.
Each difference for each record might result in different severities. Some might crash, while others harmless.

What do we do if some data was expected, but missing? Or alternatively, we see data we did not expect?

Might want to separate each record type's differences as a separate error code, then?

ghost commented 4 years ago

I'll clarify that this includes the record being the correct form but missing required data.

Might want to separate each record type's differences as a separate error code, then?

Or simply include the record that it was supposed to be and the record it got in the error code.

Noggog commented 4 years ago

Ah, I mention giving each an error code (or maybe just defining a few), as different records may be different severities. One record's extra or missing data might be harmless while another's causes a CTD.

There's a few ways to handle it. I'm sort of following typical "compiler" patterns, which just define different error codes per error type. In this case there would be a code per severity level, which would depend on which record had the issue, as only some would be problems?