Skip to content

Commit

Permalink
recover full source path for Infer
Browse files Browse the repository at this point in the history
  • Loading branch information
kenohassler committed Mar 7, 2024
1 parent efd116f commit 47cded5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,11 @@ def _format(self, string: str) -> SASTFlags:
line = flag["line"]
vuln = flag["bug_type"]

file = Path(file).name
# remove the temp prefix from the path, but keep the rest
fparts = Path(file).parts
assert fparts[0] == "/" and fparts[1] == "tmp"
tmp_source = Path(fparts[0] + fparts[1]) / fparts[2] / fparts[3]
file = str(Path(file).relative_to(tmp_source))

flags.add(SASTFlag(tool, file, line, vuln))

Expand Down

0 comments on commit 47cded5

Please sign in to comment.