-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
evaluator: Add the new rule type OrtResultRule
#4349
Conversation
005a135
to
508b342
Compare
Could you amend the commit message with a concrete example for such a use-case? |
508b342
to
5fe5ce8
Compare
Done. |
5fe5ce8
to
340f2ad
Compare
A rule violation does not necessarily correspond to a specific package. For example it would not make sense to require a package identifier for a rule violation which represents an issue with the (ORT result) labels. Signed-off-by: Frank Viernau <frank.viernau@here.com>
Having a generic rule which is executed once per ORT result helps with use cases for which the more specific rules aren't a good fit. For example, a rule for checking the (ORT result) labels or the repository configuration. Signed-off-by: Frank Viernau <frank.viernau@here.com>
340f2ad
to
c4ff464
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add an example to examples/rules.kts
, maybe with a simple check for a label? And also check if any documentation needs to be updated? I'm fine with doing that in a separate PR.
Yes, will do a follow-up PR. |
@mnonnenmacher I propose to merge this example: #4499 . |
Having a generic rule which is executed once per ORT result helps with use
cases for which the more specific rules aren't a good fit. As a pre-requisite the field
RuleViolation.pkgId
is made nullable, which eliminates the assumption that a rule violation always corresponds to a package.NOTE: The PR has to be amended to properly handle the now nullable attribute in the
web-app
.