Skip to content

Possibility to exclude paths / files within a project from a scan #5018

@MarcelBochtler

Description

@MarcelBochtler

Scenario:
I do have a repository with some huge files as test resources. Sometimes even binary files.
These result in ScanCode timeouts, when it tries to scans them.

The --skip-excluded CLI parameter currently only provides the possibility to exclude Packages and whole Projects.
See:

// Determine the projects to scan as packages.
val consolidatedProjects = consolidateProjectPackagesByVcs(ortResult.getProjects(skipExcluded))
val projectPackages = consolidatedProjects.keys
val projectPackageIds = projectPackages.map { it.id }
val packages = ortResult.getPackages(skipExcluded)
.filter { it.pkg.id !in projectPackageIds }
.map { it.pkg }

Possible solution:
Use the --ignore option from ScanCode to ignore the files specified via a pathExclude in .ort.yml if --skip-excluded is used for the ORT scanner.

For FossID it is already possible to exclude files from the Project: #4976

Metadata

Metadata

Assignees

No one assigned

    Labels

    scannerAbout the scanner tool

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions