Skip to content

Commit

Permalink
adds argument --out to online_report tool (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
christophkloeffel authored Jun 17, 2024
1 parent 2b8296c commit 198cbbd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lobster/tools/core/online_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def main():
ap.add_argument("--repo-root",
help="override git repository root",
default=None)
ap.add_argument("--out",
help="output file, by default overwrite input",
default=None)
options = ap.parse_args()

if not os.path.isfile(options.lobster_report):
Expand Down Expand Up @@ -122,6 +125,7 @@ def main():

rel_path_from_root = os.path.relpath(item.location.filename,
repo_root)
# pylint: disable=possibly-used-before-assignment
actual_repo = gh_root
actual_sha = options.commit
actual_path = rel_path_from_root
Expand All @@ -140,9 +144,9 @@ def main():
line = item.location.line)
item.location = loc

report.write_report(options.lobster_report)
report.write_report(options.out if options.out else options.lobster_report)
print("LOBSTER report %s changed to use online references" %
options.lobster_report)
options.out if options.out else options.lobster_report)


if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions lobster/tools/trlc/trlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ def main():
ok = False
if ok:
stab = sm.process()
# pylint: disable=possibly-used-before-assignment
if not ok or stab is None:
print("lobster-trlc: aborting due to earlier error")
return 1
Expand Down

0 comments on commit 198cbbd

Please sign in to comment.