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

Allow to skip excluded paths (and scopes) during analysis #5968

Closed
sschuberth opened this issue Oct 19, 2022 · 3 comments
Closed

Allow to skip excluded paths (and scopes) during analysis #5968

sschuberth opened this issue Oct 19, 2022 · 3 comments
Labels
analyzer About the analyzer tool enhancement Issues that are considered to be enhancements

Comments

@sschuberth
Copy link
Member

In ORT's semantics "excluded" entities will still get analyzed / scanned by default, but the results from these show up marked as "excluded" in the reports.

This is a problem if you need to really skip e.g. a path from analysis, for example because that path contains an Android or NuGet project that cannot be properly analyzed.

The scanner (and also the advisor) already have a --skip-excluded CLI option. The proposal is to introduce --skip-excluded also to the analyzer, so that

  1. excluded paths are not searched for definition files,
  2. excluded scopes are either skipped during analysis or filtered out from the result afterwards.

That way, problematic / large projects that are also irrelevant compliance-wise in the specific project-context can be skipped and completely omitted from the results.

@sschuberth sschuberth added enhancement Issues that are considered to be enhancements analyzer About the analyzer tool labels Oct 19, 2022
@sschuberth sschuberth changed the title Allow to skip excluded paths during analysis Allow to skip excluded paths (and scopes) during analysis Oct 20, 2022
@sschuberth
Copy link
Member Author

Fun fact, we had a --remove-excludes-from-results analyzer option once, but it was removed in favor of rendering excluded stuff differently in the reports.

@hanna-modica
Copy link
Contributor

Hi @sschuberth, that is indeed interesting. And also the comment from @mnonnenmacher states, that it will be reimplemented later. So it was always planned to have this feature back, I guess? I would really appreciate it :)

@nnobelis
Copy link
Member

nnobelis commented Nov 7, 2022

Another use case that could motivate this issue:

We have a Conan project with the following issue:

Multiple  projects with the same id 'Conan:::' found. Not adding the project  defined in  'https://github.com/XXX.git/tests/conanfile.py'  to the analyzer results as it duplicates the project defined in  'https://github.com/XXX.git/conanfile.py'.

In our case, all the Conan files in /tests are excluded in .ort.yml. Therefore this issue is not really one because the Conan files in the /tests directory should not be analyzed at all !
By fixing current ORT issue, we would get rid of this issue.

oheger-bosch added a commit to boschglobal/oss-review-toolkit that referenced this issue Feb 6, 2023
If the analyzer is configured to skip excludes, it passes the Excludes
defined in the repository configuration to
PackageManager.findManagedFiles(). That way the analyzer result will
contain only projects that are not matched by a path exclude.

Resolves oss-review-toolkit#5968.

Signed-off-by: Oliver Heger <oliver.heger@bosch.io>
oheger-bosch added a commit to boschglobal/oss-review-toolkit that referenced this issue Feb 6, 2023
If the analyzer is configured to skip excludes, it passes the Excludes
defined in the repository configuration to
PackageManager.findManagedFiles(). That way the analyzer result will
contain only projects that are not matched by a path exclude.

Resolves oss-review-toolkit#5968.

Signed-off-by: Oliver Heger <oliver.heger@bosch.io>
oheger-bosch added a commit to boschglobal/oss-review-toolkit that referenced this issue Feb 6, 2023
If the analyzer is configured to skip excludes, it passes the Excludes
defined in the repository configuration to
PackageManager.findManagedFiles(). That way the analyzer result will
contain only projects that are not matched by a path exclude.

Resolves oss-review-toolkit#5968.

Signed-off-by: Oliver Heger <oliver.heger@bosch.io>
oheger-bosch added a commit to boschglobal/oss-review-toolkit that referenced this issue Feb 6, 2023
If the analyzer is configured to skip excludes, it passes the Excludes
defined in the repository configuration to
PackageManager.findManagedFiles(). That way the analyzer result will
contain only projects that are not matched by a path exclude.

Resolves oss-review-toolkit#5968.

Signed-off-by: Oliver Heger <oliver.heger@bosch.io>
oheger-bosch added a commit to boschglobal/oss-review-toolkit that referenced this issue Feb 6, 2023
If the analyzer is configured to skip excludes, it passes the Excludes
defined in the repository configuration to
PackageManager.findManagedFiles(). That way the analyzer result will
contain only projects that are not matched by a path exclude.

Resolves oss-review-toolkit#5968.

Signed-off-by: Oliver Heger <oliver.heger@bosch.io>
oheger-bosch added a commit to boschglobal/oss-review-toolkit that referenced this issue Feb 6, 2023
If the analyzer is configured to skip excludes, it passes the Excludes
defined in the repository configuration to
PackageManager.findManagedFiles(). That way the analyzer result will
contain only projects that are not matched by a path exclude.

Resolves oss-review-toolkit#5968.

Signed-off-by: Oliver Heger <oliver.heger@bosch.io>
oheger-bosch added a commit to boschglobal/oss-review-toolkit that referenced this issue Feb 6, 2023
If the analyzer is configured to skip excludes, it passes the Excludes
defined in the repository configuration to
PackageManager.findManagedFiles(). That way the analyzer result will
contain only projects that are not matched by a path exclude.

Resolves oss-review-toolkit#5968.

Signed-off-by: Oliver Heger <oliver.heger@bosch.io>
oheger-bosch added a commit to boschglobal/oss-review-toolkit that referenced this issue Feb 6, 2023
If the analyzer is configured to skip excludes, it passes the Excludes
defined in the repository configuration to
PackageManager.findManagedFiles(). That way the analyzer result will
contain only projects that are not matched by a path exclude.

Resolves oss-review-toolkit#5968.

Signed-off-by: Oliver Heger <oliver.heger@bosch.io>
oheger-bosch added a commit to boschglobal/oss-review-toolkit that referenced this issue Feb 6, 2023
If the analyzer is configured to skip excludes, it passes the Excludes
defined in the repository configuration to
PackageManager.findManagedFiles(). That way the analyzer result will
contain only projects that are not matched by a path exclude.

Resolves oss-review-toolkit#5968.

Signed-off-by: Oliver Heger <oliver.heger@bosch.io>
oheger-bosch added a commit to boschglobal/oss-review-toolkit that referenced this issue Feb 7, 2023
If the analyzer is configured to skip excludes, it passes the Excludes
defined in the repository configuration to
PackageManager.findManagedFiles(). That way the analyzer result will
contain only projects that are not matched by a path exclude.

Resolves oss-review-toolkit#5968.

Signed-off-by: Oliver Heger <oliver.heger@bosch.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer About the analyzer tool enhancement Issues that are considered to be enhancements
Projects
None yet
Development

No branches or pull requests

3 participants