Rulesets may be reordered, or switched around entirely to conform to a set of external ruleset identifiers. For instance, you might have used your own internal ruleset identifiers when you first started using TICS, but in the meantime coding standards have shifted to a commonly used set of identifiers (like, for example, MISRA).
In that case, any violation suppressions
in the TICS code would now have to be changed to still ensure that all these violations stay suppressed.
As suppressions tend to exist for a reason (eg. a false positive) this is annoying. To that end, TICS can
be helped along by providing a rules.json file in the
same directory as RULES.txt
and
IMPL.txt
. The contents of this file are as follows:
{ "MOVEDRULES" : [ { "PREVIOUS_IDS" : ["YourPreviousRuleId"], "RULEID" : "YourNewRuleId" }, { "PREVIOUS_IDS" : ["AnotherPreviousRuleId", "SecondPreviousRuleId"], "RULEID" : "AnotherNewRuleId" } ] }
Do note that the contents of PREVIOUS_IDS
are a list,
so it is possible to have multiple old rule ID's in there.
This should also still work in the following cases: