Skip to content

x/tools/gopls: offer test function snippets as completion candidates in test files #61210

Description

@findleyr

Suggestion by way of @pjweinb: when typing a new function declaration in a test file (*_test.go), we could offer completion items for untested exported functions in the non-test package.

For example, if package p defines function Foo, we could offer the completion suggestion func TestFoo when typing in p_test.go.

Extra credit: populate the completion snippet with a test body that sets up a table-driven test for the function in question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions