-
Notifications
You must be signed in to change notification settings - Fork 310
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
Preparations for removing ReporterInput.resolutionProvider
#8048
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #8048 +/- ##
=========================================
Coverage 67.07% 67.08%
Complexity 2054 2054
=========================================
Files 357 357
Lines 17120 17120
Branches 2457 2457
=========================================
+ Hits 11484 11485 +1
Misses 4613 4613
+ Partials 1023 1022 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
helper-cli/src/main/kotlin/commands/repoconfig/GenerateRuleViolationResolutionsCommand.kt
Outdated
Show resolved
Hide resolved
plugins/reporters/evaluated-model/src/funTest/assets/reporter-test-input.yml
Outdated
Show resolved
Hide resolved
Use the analog `OrtResult.getRuleViolations()` instead. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
The function only returns resolutions from the repository configurations, but not the other ones from the resolved configuration. This prepares for introducing a new `getResolutions()` implementation which returns all resolutions contained in the ORT result. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Prepare for making use of it in a following change. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Make the functions adhere to the resolutions from the resolved configuration instead of those from the repository configuration. This enables upcoming simplifactions in the callers of these function. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Retrieve all resolutions from the provider earlier, and integrate them into the `OrtResult` before passing the `OrtResult` to the reporters. This obviously makes it unnecessary to pass the `ResolutionProvider` to the reporters and prepares for removing the corresponding property from `ReporterInput`, so that it does not get passed around anymore. Until then, just pass a `ResolutionProvider` constructed from `OrtResult`'s resolutions, to avoid querying the resolutions again. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
The reporter command has been changed to ensure that all resolutions are included in the `OrtResult` before passing it around to the reporters. Reflect that also in this test asset. This prepares for the removal of `ResolutionProvider` from the `EvaluatedModelMapper` / `StatisticsCalculator`. Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Issue(message = "Issue message to resolve", source = ""), | ||
Issue(message = "Non-resolved issue", source = "") | ||
) | ||
Identifier("Maven:org.oss-review-toolkit:example:1.0") to listOf( |
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.
Just for my understanding: Is this change necessary because the original resolution from the repo config was not actually "baked" into the resolutions from the resolved configuration in the hard-coded test asset, although it usually would be if the repo config is read by ORT?
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.
I.e. this is a bit similar to the adjustments of the test asset in your last commit 398a621, correct?
See individual commits.
Part of #7921.