From 44786dd8c99d56112d73a9c130ea93595ff96f3d Mon Sep 17 00:00:00 2001 From: Lauren Date: Fri, 22 Jul 2022 15:45:16 -0400 Subject: [PATCH] update CONTRIBUTING.md to include mockgen link, fix typo --- docs/CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index ed89ede0b..d99a8be3d 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -18,7 +18,7 @@ There are instances where several new resources being added (i.e Workspace Run T ## Running the Linters Locally -1. Ensure you have have [installed golangci-lint](https://golangci-lint.run/usage/install/#local-installation) +1. Ensure you have [installed golangci-lint](https://golangci-lint.run/usage/install/#local-installation) 2. From the CLI, run `golangci-lint run` ## Writing Tests @@ -30,6 +30,7 @@ The test suite contains many acceptance tests that are run against the latest ve We've included VSCode settings to assist with configuring the go extension. For other editors that integrate with the [Go Language Server](https://github.com/golang/tools/tree/master/gopls), the main thing to do is to add the `integration` build tags so that the test files are found by the language server. See `.vscode/settings.json` for more details. ## Generating Mocks +Ensure you have installed the [mockgen](https://github.com/golang/mock) tool. You'll need to generate mocks if an existing endpoint method is modified or a new method is added. To generate mocks, simply run `./generate_mocks.sh` If you're adding a new API resource to go-tfe, you'll need to add the command to `generate_mocks.sh`. For example if someone creates `example_resource.go`, you'll add: