Skip to content

Commit

Permalink
Merge pull request #476 from hashicorp/laurenolivia/docs-update-contr…
Browse files Browse the repository at this point in the history
…ibuting-md

update CONTRIBUTING.md to include mockgen link, fix typo
  • Loading branch information
laurenolivia committed Jul 22, 2022
2 parents 392b639 + 44786dd commit b1b6bfa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/CONTRIBUTING.md
Expand Up @@ -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
Expand All @@ -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:

Expand Down

0 comments on commit b1b6bfa

Please sign in to comment.