Skip to content

Commit

Permalink
feat(model): Add isExcluded to EvaluatedIssue
Browse files Browse the repository at this point in the history
The property is supposed to be used to filter out excluded issues in
the WebApp.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Apr 26, 2024
1 parent c91f248 commit e64bcbd
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ issues:
source: "FakeScanner"
message: "ERROR: Timeout after 300 seconds while scanning file 'project/file-within-excluded-project.dat'."
severity: "ERROR"
is_excluded: true
pkg: 0
scan_result: 0
how_to_fix: "Some how to fix text."
Expand All @@ -86,6 +87,7 @@ issues:
source: "FakeScanner"
message: "Example hint."
severity: "HINT"
is_excluded: true
pkg: 0
scan_result: 0
how_to_fix: "Some how to fix text."
Expand All @@ -95,6 +97,7 @@ issues:
source: "FakeScanner"
message: "Example warning."
severity: "WARNING"
is_excluded: true
pkg: 0
scan_result: 0
how_to_fix: "Some how to fix text."
Expand All @@ -104,6 +107,7 @@ issues:
source: "FakeScanner"
message: "Example error."
severity: "ERROR"
is_excluded: true
pkg: 0
scan_result: 0
how_to_fix: "Some how to fix text."
Expand All @@ -115,6 +119,7 @@ issues:
severity: "ERROR"
resolutions:
- 0
is_excluded: true
pkg: 0
scan_result: 0
how_to_fix: "Some how to fix text."
Expand Down Expand Up @@ -178,6 +183,7 @@ issues:
source: "FakeScanner"
message: "ERROR: Timeout after 300 seconds while scanning file 'analyzer/src/funTest/assets/projects/synthetic/gradle/lib/excluded-file.dat'."
severity: "ERROR"
is_excluded: true
pkg: 1
scan_result: 1
how_to_fix: "Some how to fix text."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"source" : "FakeScanner",
"message" : "ERROR: Timeout after 300 seconds while scanning file 'project/file-within-excluded-project.dat'.",
"severity" : "ERROR",
"is_excluded" : true,
"pkg" : 0,
"scan_result" : 0,
"how_to_fix" : "Some how to fix text."
Expand All @@ -112,6 +113,7 @@
"source" : "FakeScanner",
"message" : "Example hint.",
"severity" : "HINT",
"is_excluded" : true,
"pkg" : 0,
"scan_result" : 0,
"how_to_fix" : "Some how to fix text."
Expand All @@ -122,6 +124,7 @@
"source" : "FakeScanner",
"message" : "Example warning.",
"severity" : "WARNING",
"is_excluded" : true,
"pkg" : 0,
"scan_result" : 0,
"how_to_fix" : "Some how to fix text."
Expand All @@ -132,6 +135,7 @@
"source" : "FakeScanner",
"message" : "Example error.",
"severity" : "ERROR",
"is_excluded" : true,
"pkg" : 0,
"scan_result" : 0,
"how_to_fix" : "Some how to fix text."
Expand All @@ -143,6 +147,7 @@
"message" : "Example error, resolved.",
"severity" : "ERROR",
"resolutions" : [ 0 ],
"is_excluded" : true,
"pkg" : 0,
"scan_result" : 0,
"how_to_fix" : "Some how to fix text."
Expand Down Expand Up @@ -210,6 +215,7 @@
"source" : "FakeScanner",
"message" : "ERROR: Timeout after 300 seconds while scanning file 'analyzer/src/funTest/assets/projects/synthetic/gradle/lib/excluded-file.dat'.",
"severity" : "ERROR",
"is_excluded" : true,
"pkg" : 1,
"scan_result" : 1,
"how_to_fix" : "Some how to fix text."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ issues:
source: "FakeScanner"
message: "ERROR: Timeout after 300 seconds while scanning file 'project/file-within-excluded-project.dat'."
severity: "ERROR"
is_excluded: true
pkg: 0
scan_result: 0
how_to_fix: "Some how to fix text."
Expand All @@ -86,6 +87,7 @@ issues:
source: "FakeScanner"
message: "Example hint."
severity: "HINT"
is_excluded: true
pkg: 0
scan_result: 0
how_to_fix: "Some how to fix text."
Expand All @@ -95,6 +97,7 @@ issues:
source: "FakeScanner"
message: "Example warning."
severity: "WARNING"
is_excluded: true
pkg: 0
scan_result: 0
how_to_fix: "Some how to fix text."
Expand All @@ -104,6 +107,7 @@ issues:
source: "FakeScanner"
message: "Example error."
severity: "ERROR"
is_excluded: true
pkg: 0
scan_result: 0
how_to_fix: "Some how to fix text."
Expand All @@ -115,6 +119,7 @@ issues:
severity: "ERROR"
resolutions:
- 0
is_excluded: true
pkg: 0
scan_result: 0
how_to_fix: "Some how to fix text."
Expand Down Expand Up @@ -178,6 +183,7 @@ issues:
source: "FakeScanner"
message: "ERROR: Timeout after 300 seconds while scanning file 'analyzer/src/funTest/assets/projects/synthetic/gradle/lib/excluded-file.dat'."
severity: "ERROR"
is_excluded: true
pkg: 1
scan_result: 1
how_to_fix: "Some how to fix text."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ data class EvaluatedIssue(
val severity: Severity = Severity.ERROR,
@JsonInclude(JsonInclude.Include.NON_EMPTY)
val resolutions: List<IssueResolution>,
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
val isExcluded: Boolean = false,
@JsonIdentityReference(alwaysAsId = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
val pkg: EvaluatedPackage?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ internal class EvaluatedModelMapper(private val input: ReporterInput) {
message = issue.message,
severity = issue.severity,
resolutions = resolutions,
isExcluded = input.ortResult.isExcluded(issue, pkg.id),
pkg = pkg,
scanResult = scanResult,
path = path,
Expand Down

0 comments on commit e64bcbd

Please sign in to comment.