Skip to content

Commit a6a2cab

Browse files
fix: aesthetics with output spacing on the console and in JIRA issue description
1 parent 7bc22f4 commit a6a2cab

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ def main():
103103
issue_desc = utilsObj.serialize_finding_attributes(
104104
finding_file_key = sarif_per_file_key,
105105
findings = issue
106-
) + "\n___\n\n"
106+
) + "\n___\n"
107107
else:
108108
issue_desc += utilsObj.serialize_finding_attributes(
109109
finding_file_key = sarif_per_file_key,
110110
findings = issue
111-
) + "\n___\n\n"
111+
) + "\n___\n"
112112

113-
# issue_desc += "[" + sarif_tool_name + "] " + issue["ruleId"] + ": " + issue["message"] + " - " + sarif_per_file_key + "\nStart Line #: " + str(issue["startLine"]) + ", character " + str(issue["startColumn"]) + "\nEnd Line #: " + str(issue["endLine"]) + ", character " + str(issue["endColumn"]) + "\n___\n\n"
113+
# issue_desc += "[" + sarif_tool_name + "] " + issue["ruleId"] + ": " + issue["message"] + " - " + sarif_per_file_key + "\nStart Line #: " + str(issue["startLine"]) + ", character " + str(issue["startColumn"]) + "\nEnd Line #: " + str(issue["endLine"]) + ", character " + str(issue["endColumn"]) + "\n___\n"
114114

115115
logger.debug("JIRA Issue Summary: " + str(issue_summary))
116116
logger.debug("JIRA Issue Description: %s", str(issue_desc.validate()) if isinstance(issue_desc, ADFDoc) else issue_desc)

utils/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ def serialize_finding_attributes(self, finding_file_key: str, findings: dict) ->
2727
result_str = findings[attribute] + ': ' + result_str
2828

2929
if attribute == "message":
30-
result_str += findings[attribute] + ' - ' + finding_file_key
30+
result_str += findings[attribute] + ' - ' + finding_file_key + "\n"
3131

3232
for attribute in findings.keys():
3333

3434
if attribute not in [ "ruleId", "message" ]:
35-
result_str += ", " + attribute + ' = ' + str(findings[attribute]) + ", "
35+
result_str += attribute + ' = ' + str(findings[attribute]) + "\n"
3636

3737
if result_str[-2:] == ', ':
3838
return result_str[:-2]

0 commit comments

Comments
 (0)