Module tiger_lib::report

source ·
Expand description

Error report collection and printing facilities.

Structs

Enums

  • Mostly invisible in the output. User can filter by minimum confidence level. This would be a dial for how many false positives they’re willing to put up with.
  • Determines the output colour. User can also filter by minimum severity level: e.g. don’t show me Info-level messages.

Functions

  • Record dir as the path to a secondary mod to be loaded before the one being validated. label is what this mod should be called in the error reports; ideally only a few characters long.
  • Disable color in the output.
  • Print all the stored reports to the error output. Set json if they should be printed as a JSON array. Otherwise they are printed in the default output format.
  • Store an error report to be emitted when emit_reports is called.
  • TODO:
  • Record dir as the path to the mod being validated.
  • Configure the error reports to be written to this file instead of to stdout.
  • Override the default OutputStyle. (Controls ansi colors)
  • Configure the error reporter to show errors that are in extra loaded mods. Normally those are filtered out, to only show errors that involve the mod’s code.
  • Configure the error reporter to show errors that are in the base game code. Normally those are filtered out, to only show errors that involve the mod’s code.
  • Record dir as the path to the base game files. It should be a path to the directory containing the game directory.
  • Extract the stored reports, sort them, and return them as a vector of LogReport. The stored reports will be left empty.
  • Tests whether the report might be printed. If false, the report will definitely not be printed.