Suppression file
Posted: Sat May 21, 2022 4:51 pm
I'd like to use a suppression file to eliminate the false positives golem can give. My current thinking is that each mod create an IDS for each warning, list files which should be suppressed in that IDS, and then amend the checking code to ignore the check if the current source_res is listed in the IDS named after the current check, e.g. for HI61 amend fix_enchantment.tpp to the below.
Are you open to a pull request along these lines?
Code: Select all
SET ignore = IDS_OF_SYMBOL("h161" ~%SOURCE_RES%~)
PATCH_IF enchantment = 0
AND magic_flag != 0
AND VARIABLE_IS_SET $item_type(~%type%~)
AND NOT (~%SOURCE_FILE%~ STR_EQ ~aegis.itm~)
AND NOT (~%SOURCE_FILE%~ STR_EQ ~aegis2.itm~) // skip aegis for now, see https://github.com/Gibberlings3/BG2-Fixpack/pull/7
AND ~%ignore%~ = ~-1~
BEGIN
PATCH_PRINT ~HI61: %SOURCE_FILE% - magic flag %magic_flag% and enchantment level %enchantment% are inconsistent.~
END