Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove check if analysis started temporarily, until a final CLI form is printed #144

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/models/IDE/VisualStudioCode.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from src.models.IDE.VSCodeCommandEnum import VSCodeCommandEnum
from src.utils.general import get_clipboard_text
from src.utils.general import parse_kantra_cli_command
from src.utils.general import parse_log_string


class VisualStudioCode(Application):
Expand Down Expand Up @@ -82,10 +81,15 @@ def run_simple_analysis(self, configuration_name: str):
self.type_text(configuration_name)
self.press_keys("enter")

# todo: There's is really no need to verify if the analysis started or not, because it will eventually go to one of 3 states, analysis failed, analysis completed, or timout error
# todo: add assertion when the developers stop tweaking the cli output so often.
# Verify analysis has started
terminal_lines = self.copy_terminal_output()
log_map = parse_log_string(terminal_lines[7])
assert log_map["msg"] == "running source code analysis"
# logger.info("Copy terminal lines:")
# terminal_lines = self.copy_terminal_output()
# logger.info("Parse 7th line:")
# log_map = parse_log_string(terminal_lines[7])
# logger.info(log_map)
# assert log_map["msg"] == "running source code analysis"

def is_analysis_complete(self, timeout=300):
"""
Expand Down
Loading