Skip to content

Conversation

@nnobelis
Copy link
Member

@nnobelis nnobelis commented Aug 22, 2025

This PR contains some of the change still required for #10347.

Please have a look at the individual commit messages for the details.

image

@tsteenbe With these changes, the includes are rendered in the WebApp report: when a result is excluded due to the presence of includes, all includes are rendered in the collapsible section under it, with the mention (includes).

@codecov
Copy link

codecov bot commented Aug 22, 2025

Codecov Report

❌ Patch coverage is 86.04651% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.47%. Comparing base (6dd73f5) to head (bfb62c7).

Files with missing lines Patch % Lines
model/src/main/kotlin/licenses/ResolvedLicense.kt 0.00% 5 Missing ⚠️
...main/kotlin/licenses/DefaultLicenseInfoProvider.kt 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #10762      +/-   ##
============================================
+ Coverage     57.38%   57.47%   +0.09%     
- Complexity     1673     1679       +6     
============================================
  Files           346      346              
  Lines         12759    12796      +37     
  Branches       1209     1212       +3     
============================================
+ Hits           7322     7355      +33     
- Misses         4972     4976       +4     
  Partials        465      465              
Flag Coverage Δ
funTest-docker 71.15% <ø> (ø)
test-ubuntu-24.04 42.07% <86.04%> (+0.17%) ⬆️
test-windows-2025 42.05% <86.04%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nnobelis nnobelis force-pushed the nnobelis/add_includes_to_webapp_report branch from 790f7ae to 31679d2 Compare August 22, 2025 10:16
@nnobelis nnobelis force-pushed the nnobelis/add_includes_to_webapp_report branch from 31679d2 to bfb62c7 Compare August 22, 2025 13:09
@nnobelis nnobelis marked this pull request as ready for review August 25, 2025 05:07
@nnobelis nnobelis requested review from a team and tsteenbe as code owners August 25, 2025 05:07
val pathIncludes = input.ortResult.getIncludes().findPathIncludes(project, input.ortResult)
val dependencies = input.ortResult.dependencyNavigator.projectDependencies(project)
if (pathExcludes.isEmpty()) {
if (pathExcludes.isEmpty() && pathIncludes.isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a problem here: pathIncludes.isEmpty() can mean two things:

  • There are no path includes defined at all so this project is included.
  • There are path includes but none match this project so it is excluded.

I wonder if for the case that no path includes are defined at all, Includes should return a default path include which matches ** to make the usage unambiguous.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not too sure about this.

I also experimented with null to reflect the tri-state, and is the end I went with a separated boolean isExcludedByPathIncludes in EvaluatedFinding.

Maybe we can discuss this in the Community meeting.

Copy link
Member

@fviernau fviernau Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I right that semantics is as follows: A file is included, if it is not matched by any exclude OR if it is matched by at least one include and an arbitrary amount of excludes?

Copy link
Member

@mnonnenmacher mnonnenmacher Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, excludes always win. A file is included when: (there are no includes defined (which means include all) OR it is matched by an include) AND it is not matched by an exclude.

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