-
Notifications
You must be signed in to change notification settings - Fork 9
Prefer to upload files under version control #10
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
Conversation
| if (versionedFiles == 0) { | ||
| Log.error(sourceDirs.toString()); | ||
| Log.error(config.getVersionedFiles().toString()); | ||
| throw new GuruCliException(ErrorCodes.GIT_EMPTY_DIFF, |
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.
Should this be an exception or just a logged warning?
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.
This should end the workflow because there's no point sending anything to CodeGuru and it was probably a mistake. These exceptions don't show stacktraces, they just lead to an error message that aborts the upload and scan.
|
|
||
|
|
||
| @Test | ||
| public void test_zipAndUpload_happyCaseGitFilesOnly() throws Exception { |
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.
Is there a test case that covers the case when the option "scan only version controlled files" is not set?
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.
Good point. Let me add one.
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.
Looks good overall, some comments/questions.
Issue #, if available:
#7
Description of changes:
When scanning a directory that is under version control, the cli should ask if all files should be analyzed or only files that are under version control.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.