Skip to content

Add to ORT the concept of includes #10347

@nnobelis

Description

@nnobelis

ORT already supports excludes in the .ort.yml (see https://oss-review-toolkit.org/ort/docs/configuration/ort-yml#excludes-basics).

I think it would be worthwhile to also support includes.

We have the following use-case: A gigantic several gigabyte monorepo when you only want to scan a part of it corresponding to some deliverable.
Generating excludes for everything that should not be scanned is not scalable: you would have to update the .ort.yml everytime there is a new thing in the repository would want to exclude from the scan.
Using the VCS path argument only allows to scan on directory but the source of the deliverable can be scattered across some disjoint directories.

If the concept of includes is accepted, we need to discuss their interaction with excludes.

Maybe a first trivial implementation could be "if you have includes defined, excludes are ignored".

Please note that the the filtering based on excludes should be done in a central place e.g. similarly to org.ossreviewtoolkit.model.config.PathExclude#matches and org.ossreviewtoolkit.analyzer.PackageManager.Companion#isPathExcluded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    modelAbout the data model

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions