guardian / typerighter

Even if you’re the right typer, couldn’t hurt to use Typerighter!
Apache License 2.0
276 stars 12 forks source link

Add additional properties to the rule model #300

Closed aracho1 closed 1 year ago

aracho1 commented 1 year ago

co-authored-by: @jonathonherbert

What does this change?

Further to #273, this PR adds the missing properties (e.g. notes, googleSheetId, forceRedRule, advisoryRule) to the rule model. SheetsRuleManager now creates dbRule instead of RuleResource.

When translating rules in the database into the rule resource for the checker, the rule manager filters out any rules that should be ignored (ignore = true).

How to test

How can we measure success?

We can refresh rules from the Google sheet with those additional properties, and read them from S3. Additional work to add the UI is to come.

Have we considered potential risks?

There is a new test to check that rules are filtered correctly depending on their 'ignore' flag.