Skip to content
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

Merged
merged 2 commits into from
Sep 17, 2021
Merged

Conversation

fviernau
Copy link
Member

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.

@fviernau fviernau requested a review from a team as a code owner August 10, 2021 11:22
@fviernau fviernau marked this pull request as draft August 10, 2021 11:23
@sschuberth
Copy link
Member

sschuberth commented Aug 10, 2021

helps with use cases for which the more specific rules aren't a good fit.

Could you amend the commit message with a concrete example for such a use-case?

@fviernau
Copy link
Member Author

fviernau commented Aug 10, 2021

Could you amend the commit message with a concrete example for such a use-case?

Done.

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>
Copy link
Member

@mnonnenmacher mnonnenmacher left a 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.

@fviernau
Copy link
Member Author

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.

@fviernau fviernau marked this pull request as ready for review September 17, 2021 13:57
@fviernau fviernau enabled auto-merge (rebase) September 17, 2021 13:58
@fviernau fviernau merged commit d2f1590 into master Sep 17, 2021
@fviernau fviernau deleted the ort-result-rule branch September 17, 2021 14:13
@fviernau
Copy link
Member Author

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.

@mnonnenmacher I propose to merge this example: #4499 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants