mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
Inform about Go workspaces in CONTRIBUTING.md
This commit is contained in:
parent
2c8ccf881a
commit
05304d081e
@ -18,12 +18,28 @@ but there is also a CI action to ensure compliance.
|
|||||||
|
|
||||||
To locally run all configured linters, execute
|
To locally run all configured linters, execute
|
||||||
|
|
||||||
```
|
```sh
|
||||||
golangci-lint run ./...
|
golangci-lint run ./...
|
||||||
```
|
```
|
||||||
|
|
||||||
It is also recommended to use golangci-lint (and [gofumpt](https://github.com/mvdan/gofumpt) as formatter) in your IDE, by adding the recommended VS Code Settings or by [configuring it yourself](https://golangci-lint.run/usage/integrations/#editor-integration)
|
It is also recommended to use golangci-lint (and [gofumpt](https://github.com/mvdan/gofumpt) as formatter) in your IDE, by adding the recommended VS Code Settings or by [configuring it yourself](https://golangci-lint.run/usage/integrations/#editor-integration)
|
||||||
|
|
||||||
|
## Nested Go modules
|
||||||
|
|
||||||
|
As this project contains nested Go modules, it is recommended to create a local Go workspace, so your IDE can lint multiple modules at once.
|
||||||
|
|
||||||
|
```go
|
||||||
|
go 1.18
|
||||||
|
|
||||||
|
use (
|
||||||
|
.
|
||||||
|
./hack
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
You can find an introduction in the [Go workspace tutorial](https://go.dev/doc/tutorial/workspaces).
|
||||||
|
|
||||||
|
If you have changed dependencies within a module and have run `go mod tidy`, you can use `go work sync` to sync versions of the same dependency of the different modules.
|
||||||
|
|
||||||
## Recommended VS Code Settings
|
## Recommended VS Code Settings
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user