Skip to content

Commit

Permalink
[#128]: Fix SA issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Feb 26, 2025
1 parent 10185e5 commit e01f018
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/static_analysis_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def create_comment_for_output(tool_output, files_changed_in_pr, output_to_consol
list_of_issues = []
per_issue_string = ""

utils.debug_print(f"PyLint output:\n{tool_output}")
utils.debug_print(f"PyLint output:\n{tool_output}\n")

for line in tool_output:
file_path = line["path"]
Expand Down
6 changes: 3 additions & 3 deletions test/test_static_analysis_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import utils.helper_functions as utils

try:
project_path = f"{os.sep}".join(os.path.abspath(__file__).split(os.sep)[:-2])
sys.path.append(project_path)
PROJECT_PATH = f"{os.sep}".join(os.path.abspath(__file__).split(os.sep)[:-2])
sys.path.append(PROJECT_PATH)
except Exception as exception:
print(f"Can not add project path to system path! Exiting!\nERROR: {exception}")
raise SystemExit(1) from exception

os.environ["GITHUB_WORKSPACE"] = f"{project_path}/test/utils/dummy_project"
os.environ["GITHUB_WORKSPACE"] = f"{PROJECT_PATH}/test/utils/dummy_project"
os.environ["INPUT_VERBOSE"] = "True"
os.environ["INPUT_REPORT_PR_CHANGES_ONLY"] = "False"
os.environ["INPUT_REPO"] = "RepoName"
Expand Down
6 changes: 3 additions & 3 deletions test/test_static_analysis_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import sys

try:
project_path = f"{os.sep}".join(os.path.abspath(__file__).split(os.sep)[:-2])
sys.path.append(project_path)
PROJECT_PATH = f"{os.sep}".join(os.path.abspath(__file__).split(os.sep)[:-2])
sys.path.append(PROJECT_PATH)
except Exception as exception:
print(f"Can not add project path to system path! Exiting!\nERROR: {exception}")
raise SystemExit(1) from exception

os.environ["GITHUB_WORKSPACE"] = f"{project_path}/test/utils/dummy_project"
os.environ["GITHUB_WORKSPACE"] = f"{PROJECT_PATH}/test/utils/dummy_project"
os.environ["INPUT_VERBOSE"] = "True"
os.environ["INPUT_REPORT_PR_CHANGES_ONLY"] = "False"
os.environ["INPUT_REPO"] = "RepoName"
Expand Down
4 changes: 2 additions & 2 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import sys

try:
project_path = f"{os.sep}".join(os.path.abspath(__file__).split(os.sep)[:-2])
sys.path.append(project_path)
PROJECT_PATH = f"{os.sep}".join(os.path.abspath(__file__).split(os.sep)[:-2])
sys.path.append(PROJECT_PATH)
except Exception as exception:
print(f"Can not add project path to system path! Exiting!\nERROR: {exception}")
raise SystemExit(1) from exception
Expand Down

0 comments on commit e01f018

Please sign in to comment.