Skip to content

Commit

Permalink
Merge pull request #2 from felickz/start-line
Browse files Browse the repository at this point in the history
feat: include line number in location path for most recent instance
  • Loading branch information
felickz authored Jan 16, 2025
2 parents a41009c + 7c74de5 commit c2a1852
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64736,7 +64736,9 @@ class CodeScanning extends Printable {
a.rule?.security_severity_level || a.rule?.severity || "",
this.cweFromTags(a),
a.tool?.name || "",
a.most_recent_instance?.location.path || "",
a.most_recent_instance?.location?.path
? `${a.most_recent_instance.location.path}#L${a.most_recent_instance.location.start_line}`
: "",
a.html_url,
]);
}
Expand Down
4 changes: 3 additions & 1 deletion src/context/CodeScanning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ export class CodeScanning extends Printable implements Feature {
a.rule?.security_severity_level || a.rule?.severity || "",
this.cweFromTags(a),
a.tool?.name || "",
a.most_recent_instance?.location.path || "",
a.most_recent_instance?.location?.path
? `${a.most_recent_instance.location.path}#L${a.most_recent_instance.location.start_line}`
: "",
a.html_url,
]);
}
Expand Down

0 comments on commit c2a1852

Please sign in to comment.