-
Notifications
You must be signed in to change notification settings - Fork 457
Fix CLI parse status filter #4784
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
Merged
+88
−12
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of checking the existence of the file? I think, it can be a valid scenario to ask the users to send me their report folder and I make some queries about their analyzed files on my machine where the project code is not available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, we assume the
report_dir/and the source files are on the same system.Typical use case for the
--statuscommand with--fileoption is to check whether a local file has been analysed or not. This is also used heavily in the VSCode plugin. Moreover, we would also like to know if a file has been recently analyzed or outdated, thus we check the modification time of the local source file in functionget_report_dir_status. If the modification time of the source file is more recent than the creation of thereport_dir/, we consider the analysis status outdated.This all assumes the report directory and the source files are on the same system. If this is the case, it is pointless to use the
--filefilter on a nonexisting file, thus an error was added.While this is valid, I believe this is a separate use case. As an alternative, maybe we could add a flag like
--ignore-nonexisting-filesor something like that. But in the above case, we should at least somehow inform the user that they tried to query analysis information of non-existing files.