Skip to content

Commit

Permalink
update write command
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahannali committed Dec 19, 2024
1 parent a1ffcf2 commit 1a0f5a8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions action.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def run_linters():
# todo: add to reviewdog config instead
linters = ['mypy', 'pylint']
for linter in linters:
save_file = f"sarif_output.json"
save_file = f"sarif_output_{linter}.json"

subprocess.run(
f'{linter} | reviewdog -reporter=sarif -runners={linter} --name={linter} --conf={github_action_path}/.reviewdog.yml >> {save_file}',
f'{linter} | reviewdog -reporter=sarif -runners={linter} --name={linter} --conf={github_action_path}/.reviewdog.yml > {save_file}',
shell=True,
stderr=subprocess.PIPE,
check=True,
Expand All @@ -40,7 +40,10 @@ def run_linters():
file.write(commit_hash)
file.write("\n")
file.write(repo_name)
file.write(save_file)
file.write("\n")

for line in save_file:
file.write(line)
# data = {
# "repo_name": repo_name,
# "commit_hash": commit_hash,
Expand Down

0 comments on commit 1a0f5a8

Please sign in to comment.