Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Dont generate unit tests for non Go files #584

Merged
merged 1 commit into from
Oct 31, 2016

Conversation

ramya-rao-a
Copy link
Contributor

Fixes #563

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

I also noticed that gotests won't generate tests if the test files already exist, and it will write a message to stdout saying that. But vscode-go will still show the success message. Maybe can just show gotests's output in the future.

return;
}
if (!editor.document.fileName.endsWith('.go')) {
vscode.window.showInformationMessage('Cannot generate unit tests. File in the editor is not a Go file.');
Copy link
Member

Choose a reason for hiding this comment

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

Is there definitely no case where a go file can have some other extension?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@roblourens Not that I know of

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I searched around and couldn't find any

@ramya-rao-a
Copy link
Contributor Author

@roblourens #566 is tracking your #584 (review)

@ramya-rao-a ramya-rao-a merged commit 2df9204 into microsoft:master Oct 31, 2016
@ramya-rao-a ramya-rao-a deleted the generateTestsUpdate branch April 9, 2017 16:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants