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

Dont generate unit tests for non Go files#584

Merged
ramya-rao-a merged 1 commit intomicrosoft:masterfrom
ramya-rao-a:generateTestsUpdate
Oct 31, 2016
Merged

Dont generate unit tests for non Go files#584
ramya-rao-a merged 1 commit intomicrosoft:masterfrom
ramya-rao-a:generateTestsUpdate

Conversation

@ramya-rao-a
Copy link
Copy Markdown
Contributor

Fixes #563

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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