Skip to content

Instantly share code, notes, and snippets.

@kenoir
Created December 2, 2022 15:03
Show Gist options
  • Save kenoir/9f650bc03680e7f377189cf7bef523dc to your computer and use it in GitHub Desktop.
Save kenoir/9f650bc03680e7f377189cf7bef523dc to your computer and use it in GitHub Desktop.
val checkResults = RepoRule.values.map(rule =>
(rule.evaluate(basicRepo), rule.violationMessage)
)
@nicl
Copy link

nicl commented Dec 2, 2022

? i.e. a rule returns (possibly) an 'Error' - which is something containing metadata about the error. This way, the rule can parameterise Error somehow with repository (or other) info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment