Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(reporters): Add two scan issues to reporter-test-input.yml
Browse files Browse the repository at this point in the history
Add one issue to an included- and another to an excluded project to
cover both cases with tests. This prepares adding the ability to filter
excluded issues to the WebApp.

Note: There are three copies of `reporter-test-input.yml` which are all
      updated for consistency. Furthremore, the affected paths of the
      issues have been choosen to be within the VCS path, so that the
      issues do net get filtered out by
      `OrtResult.getScanResultsForId()`.

Signed-off-by: Frank Viernau <[email protected]>
fviernau committed Apr 22, 2024
1 parent 0efee8f commit 50aeb43
Showing 7 changed files with 522 additions and 406 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -479,6 +479,11 @@ scanner:
path: "project/file1.java"
start_line: 1
end_line: 1
issues:
- timestamp: "2024-04-22T10:36:10.661544294Z"
source: "FakeScanner"
message: "ERROR: Timeout after 300 seconds while scanning file 'project/some/file.dat'."
affected_path: "project/some/file.dat"
- provenance:
vcs_info:
type: "Git"
@@ -529,6 +534,10 @@ scanner:
\ Please make sure the published POM file includes the SCM connection, see:\
\ https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom"
severity: "ERROR"
- timestamp: "2024-04-22T10:36:10.661544294Z"
source: "FakeScanner"
message: "ERROR: Timeout after 300 seconds while scanning file 'analyzer/src/funTest/assets/projects/synthetic/gradle/lib/another/file.dat'."
affected_path: "analyzer/src/funTest/assets/projects/synthetic/gradle/lib/another/file.dat"
- provenance:
source_artifact:
url: "https://repo.maven.apache.org/maven2/com/h2database/h2/1.4.200/h2-1.4.200-sources.jar"
Original file line number Diff line number Diff line change
@@ -479,6 +479,11 @@ scanner:
path: "project/file1.java"
start_line: 1
end_line: 1
issues:
- timestamp: "2024-04-22T10:36:10.661544294Z"
source: "FakeScanner"
message: "ERROR: Timeout after 300 seconds while scanning file 'project/some/file.dat'."
affected_path: "project/some/file.dat"
- provenance:
vcs_info:
type: "Git"
@@ -529,6 +534,10 @@ scanner:
\ Please make sure the published POM file includes the SCM connection, see:\
\ https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom"
severity: "ERROR"
- timestamp: "2024-04-22T10:36:10.661544294Z"
source: "FakeScanner"
message: "ERROR: Timeout after 300 seconds while scanning file 'analyzer/src/funTest/assets/projects/synthetic/gradle/lib/another/file.dat'."
affected_path: "analyzer/src/funTest/assets/projects/synthetic/gradle/lib/another/file.dat"
- provenance:
source_artifact:
url: "https://repo.maven.apache.org/maven2/com/h2database/h2/1.4.200/h2-1.4.200-sources.jar"
Original file line number Diff line number Diff line change
@@ -479,6 +479,11 @@ scanner:
path: "project/file1.java"
start_line: 1
end_line: 1
issues:
- timestamp: "2024-04-22T10:36:10.661544294Z"
source: "FakeScanner"
message: "ERROR: Timeout after 300 seconds while scanning file 'project/some/file.dat'."
affected_path: "project/some/file.dat"
- provenance:
vcs_info:
type: "Git"
@@ -529,6 +534,10 @@ scanner:
\ Please make sure the published POM file includes the SCM connection, see:\
\ https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom"
severity: "ERROR"
- timestamp: "2024-04-22T10:36:10.661544294Z"
source: "FakeScanner"
message: "ERROR: Timeout after 300 seconds while scanning file 'analyzer/src/funTest/assets/projects/synthetic/gradle/lib/another/file.dat'."
affected_path: "analyzer/src/funTest/assets/projects/synthetic/gradle/lib/another/file.dat"
- provenance:
source_artifact:
url: "https://repo.maven.apache.org/maven2/com/h2database/h2/1.4.200/h2-1.4.200-sources.jar"
Original file line number Diff line number Diff line change
@@ -454,7 +454,7 @@ <h2>Labels</h2>
<h2>Index</h2>
<ul>
<li><a href="#rule-violation-summary">Rule Violation Summary (1 errors, 1 warnings, 0 hints to resolve)</a></li>
<li><a href="#issue-summary">Issue Summary (1 errors, 0 warnings, 0 hints to resolve)</a></li>
<li><a href="#issue-summary">Issue Summary (2 errors, 0 warnings, 0 hints to resolve)</a></li>
<li><a href="#Gradle:org.ossreviewtoolkit:nested-fake-project:1.0.0">Gradle:org.ossreviewtoolkit:nested-fake-project:1.0.0
<div class="ort-reason">Excluded: EXAMPLE_OF - The project is an example.</div></a></li>
<li><a href="#Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0">Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0</a></li>
@@ -531,7 +531,7 @@ <h2 id="rule-violation-summary">Rule Violation Summary (1 errors, 1 warnings, 0
</tr>
</tbody>
</table>
<h2 id="issue-summary">Issue Summary (1 errors, 0 warnings, 0 hints to resolve)</h2>
<h2 id="issue-summary">Issue Summary (2 errors, 0 warnings, 0 hints to resolve)</h2>
<p>Issues from excluded components are not shown in this summary.</p>
<h3>Packages</h3>
<table class="ort-report-table">
@@ -563,6 +563,23 @@ <h3>Packages</h3>

<li><strong>Step 2</strong></li>

<li><em><strong>Step 3</strong></em>
<code>Some long issue resolution text to verify that overflow:scroll is working as expected.</code></li>
</ul>
</details>
<li>
<p>2024-04-22T10:36:10.661544294Z [ERROR]: FakeScanner - ERROR: Timeout after 300 seconds
while scanning file 'analyzer/src/funTest/assets/projects/synthetic/gradle/lib/another/file.dat'.</p>
<p></p>
</li>
<details>
<summary>How to fix</summary>
<ul>

<li><em>Step 1</em></li>

<li><strong>Step 2</strong></li>

<li><em><strong>Step 3</strong></em>
<code>Some long issue resolution text to verify that overflow:scroll is working as expected.</code></li>
</ul>
@@ -612,7 +629,7 @@ <h3 class="ort-excluded">Packages</h3>
</tr>
</thead>
<tbody>
<tr class="ort-success " id="Gradle:org.ossreviewtoolkit:nested-fake-project:1.0.0-pkg-1">
<tr class="ort-error " id="Gradle:org.ossreviewtoolkit:nested-fake-project:1.0.0-pkg-1">
<td><a href="#Gradle:org.ossreviewtoolkit:nested-fake-project:1.0.0-pkg-1">1</a></td>
<td>Gradle:org.ossreviewtoolkit:nested-fake-project:1.0.0</td>
<td></td>
@@ -636,7 +653,12 @@ <h3 class="ort-excluded">Packages</h3>
<ul></ul>
</td>
<td>
<ul></ul>
<ul>
<li>
<p>2024-04-22T10:36:10.661544294Z [ERROR]: FakeScanner - ERROR: Timeout after 300 seconds
while scanning file 'project/some/file.dat'.</p>
</li>
</ul>
</td>
</tr>
</tbody>
@@ -704,6 +726,10 @@ <h3 class="">Packages</h3>
'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.<br>Caused by: DownloadException: No VCS URL provided for 'Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0'.
Please make sure the published POM file includes the SCM connection, see: https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom</p>
</li>
<li>
<p>2024-04-22T10:36:10.661544294Z [ERROR]: FakeScanner - ERROR: Timeout after 300 seconds
while scanning file 'analyzer/src/funTest/assets/projects/synthetic/gradle/lib/another/file.dat'.</p>
</li>
</ul>
</td>
</tr>

0 comments on commit 50aeb43

Please sign in to comment.