Skip to content

Commit 30a3a34

Browse files
committed
Add kind to RaceSummary
1 parent b3aae5e commit 30a3a34

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

gobexec/goblint/result.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ def __init__(self,
2626
def template(self, env):
2727
return env.get_template("racesummary.jinja")
2828

29+
@property
30+
def kind(self):
31+
if self.unsafe > 0:
32+
return ResultKind.ERROR
33+
elif self.vulnerable > 0:
34+
return ResultKind.WARNING
35+
else:
36+
return ResultKind.SUCCESS
37+
2938
@staticmethod
3039
async def extract(ec: ExecutionContext[Any], cp: CompletedSubprocess) -> 'RaceSummary':
3140
stdout = cp.stdout.decode("utf-8")

0 commit comments

Comments
 (0)