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

Do not allow parse if the <report dir> does not exist #4212

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

noraz31
Copy link
Collaborator

@noraz31 noraz31 commented Apr 11, 2024

This change prevents the CodeChecker parse command
from running if the entered report dir or filepath
parameter does not exist.
Up until now, the parse command ran with any parameters,
reporting zero findings if a wrong parameter was entered.
Fixes #4186

@noraz31 noraz31 requested review from bruntib and vodorok as code owners April 11, 2024 12:57
@vodorok vodorok marked this pull request as draft April 11, 2024 13:04
@noraz31 noraz31 force-pushed the missing_report_dir_alert branch 2 times, most recently from 75a06b2 to d2f2b0f Compare April 11, 2024 13:42
@noraz31 noraz31 marked this pull request as ready for review April 11, 2024 13:46
Comment on lines 286 to 289
for input_path in args.input:
if not os.path.exists(input_path):
LOG.error(f"Input path {input_path} does not exist!")
sys.exit(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could consider emitting a warning for all non-existent paths before exiting.

analyzer/tests/functional/cmdline/test_cmdline.py Outdated Show resolved Hide resolved
This change prevents the CodeChecker parse command
from running if the entered report dir or filepath
parameter does not exist.
Up until now, the parse command ran with any parameters,
reporting zero findings if a wrong parameter was entered.
Fixes Ericsson#4186
@noraz31 noraz31 force-pushed the missing_report_dir_alert branch from d2f2b0f to 8480c51 Compare April 25, 2024 09:47
Copy link
Contributor

@Szelethus Szelethus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Szelethus Szelethus merged commit 2afffe6 into Ericsson:master Apr 30, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parse should fail when path does not exist
2 participants