Rule format - cr/Foxalyzer GitHub Wiki

We're aiming for a database of generic JSON rules that allow a report generator to be dynamically updated for low incidence response time turnarounds. From that database, the report generator needs to select the rules it requires to fulfill the reporting task at hand. It will then pass selected rules to the rule matchers they were written for, collect their output items, and work them into an appropriate report output.

We already determined that it might be best to separate the rules into a header that allows for selection, and a matcher-specific rule definition block that will be passed to the matcher.

This should turn into a proper definition of our rule format:

Rule = JSON {
  Rule name,
  Rule category,
  Matcher+Version, #which rule matcher and version is this rule written for?
  Target spec, #which target does the rule apply for? (eg. FxOS>=2.0)
  Rule definition = JSON {
    matcher-specific fields,
    ...
  }
}