Skip to content

Commit 9a61b7c

Browse files
committed
chore: rename CheckResult.get_dict to get_summary and add detail to the comment.
Signed-off-by: Nicholas Allen <[email protected]>
1 parent 62b163c commit 9a61b7c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/macaron/slsa_analyzer/analyze_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def get_dict(self) -> dict:
181181
sorted_on_id = []
182182
for res in _sorted_on_id:
183183
# res is CheckResult
184-
res_dict: dict = dict(res.get_dict())
184+
res_dict: dict = dict(res.get_summary())
185185
res_dict.pop("result_tables")
186186
sorted_on_id.append(res_dict)
187187
sorted_results = sorted(sorted_on_id, key=lambda item: item["result_type"], reverse=True)

src/macaron/slsa_analyzer/checks/check_result.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,11 @@ class CheckResult:
7070
#: The results produced by the check.
7171
result: CheckResultData
7272

73-
def get_dict(self) -> dict:
74-
"""Get a flattened dictionary representation for this CheckResult.
73+
def get_summary(self) -> dict:
74+
"""Get a flattened dictionary representation for this CheckResult, in a format suitable for the output report.
75+
76+
The SLSA requirements, in particular, are translated into a list of their textual descriptions, to be suitable
77+
for display to users in the output report (as opposed to the internal representation as a list of enum identifiers).
7578
7679
Returns
7780
-------

0 commit comments

Comments
 (0)