Skip to content

Commit

Permalink
Merge pull request #961 from sim642/goblint-url_for_version
Browse files Browse the repository at this point in the history
goblint: implement `url_for_version`
  • Loading branch information
PhilippWendler authored Nov 10, 2023
2 parents 76a7122 + cf9926f commit 7e09a24
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions benchexec/tools/goblint.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ def executable(self, tool_locator):
def version(self, executable):
return self._version_from_tool(executable, line_prefix="Goblint version: ")

def url_for_version(self, version):
m = re.fullmatch(r"(heads|tags)/(.+)-(\d+)-g([0-9a-f]{7,})(-dirty)?", version)
if m:
return f"https://github.com/goblint/analyzer/commit/{m.group(4)}"

m = re.fullmatch(r"([0-9.]+) ([0-9a-f]{40})", version)
if m:
return f"https://github.com/goblint/analyzer/commit/{m.group(2)}"

return None

def name(self):
return "Goblint"

Expand Down

0 comments on commit 7e09a24

Please sign in to comment.