ort icon indicating copy to clipboard operation
ort copied to clipboard

Path Excludes not working when workspaces are introduced in the code repository based on NPM, PNPM, Yarn2

Open porsche-rishisaxena opened this issue 1 year ago • 3 comments

Describe the bug

Path Excludes not working when workspaces are introduced in the code repository based on NPM, PNPM, Yarn2.

To Reproduce

Steps to reproduce the behavior:

  1. Sample Code Repo created to reproduce the behavior: https://github.com/porsche-ozgursedefoglu/npm-workspaces
  2. skip_excluded: true configured in .ort.yml. Please refer to https://github.com/porsche-ozgursedefoglu/npm-workspaces/blob/main/.ort.yml
  3. Run the analyzer on the above repo docker run -v $PWD:/project
    ort:latest
    -P ort.analyzer.allowDynamicVersions=true --debug analyze
    -i /project/
    -o /project/ort/

Expected behavior

After Path Exclude applied in .ort.yml, the paths are still visible in the reports which should not be the case and the below statement is violated: "ORT can be configured to skip them completely during the analysis phase. The affected elements are then not processed any further and do not occur in generated reports."

porsche-rishisaxena avatar Jul 26 '24 08:07 porsche-rishisaxena

"ORT can be configured to skip them completely during the analysis phase. The affected elements are then not processed any further and do not occur in generated reports."

@porsche-rishisaxena have you configured ORT to do so? (If yes, this could be added to the reproduce step after #1.)

fviernau avatar Jul 30 '24 07:07 fviernau

@fviernau we did this step in our .ort.yml file which you can see in the sample code repository as following; analyzer: skip_excluded: true

porsche-ozgursedefoglu avatar Jul 30 '24 08:07 porsche-ozgursedefoglu

@fviernau I have added the second step in the problem statement description what @porsche-ozgursedefoglu mentioned where we use skip_excluded: true. Please refer to the sample repo we created for reproducing: https://github.com/porsche-ozgursedefoglu/npm-workspaces/blob/main/.ort.yml

porsche-rishisaxena avatar Jul 30 '24 09:07 porsche-rishisaxena

@porsche-rishisaxena it would be great if you could confirm on your end that https://github.com/oss-review-toolkit/ort/pull/9247 fixes your issue.

sschuberth avatar Oct 09 '24 06:10 sschuberth