-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the document to include the code formatter #3203
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -19,7 +19,8 @@ _Note: If you're not using `KinD`, you can skip this step._ | |||||
kind create cluster | ||||||
``` | ||||||
|
||||||
Alternatively you can use [./hack/create-kind-cluster.sh](hack/create-kind-cluster.sh) to setup a kind cluster with a local registry. This local registry will then be available by default at `localhost:5001`. | ||||||
Alternatively you can use [./hack/create-kind-cluster.sh](hack/create-kind-cluster.sh) to setup a kind cluster with a | ||||||
local registry. This local registry will then be available by default at `localhost:5001`. | ||||||
|
||||||
```shell | ||||||
./hack/create-kind-cluster.sh | ||||||
|
@@ -44,7 +45,8 @@ export KO_DOCKER_REPO=docker.io/<username> | |||||
|
||||||
_Note: replace `<username>` with your username._ | ||||||
|
||||||
In case you setup `KinD` via [./hack/create-kind-cluster.sh](hack/create-kind-cluster.sh), the local registry is available at `localhost:5001`: | ||||||
In case you setup `KinD` via [./hack/create-kind-cluster.sh](hack/create-kind-cluster.sh), the local registry is | ||||||
available at `localhost:5001`: | ||||||
|
||||||
```shell | ||||||
export KO_DOCKER_REPO=localhost:5001 | ||||||
|
@@ -174,6 +176,31 @@ This step is required only if we're changing a protobuf definition file, or for | |||||
|
||||||
If you're unsure, whether you need to run it or not for your changes, run [our build tests](#run-build-tests). | ||||||
|
||||||
## Code Formatting | ||||||
|
||||||
### Go | ||||||
|
||||||
We are using [go fmt](https://pkg.go.dev/fmt) to format our Go code. To format your code, run the following | ||||||
command within the `control-plane` directory: | ||||||
|
||||||
```shell | ||||||
go fmt ./... | ||||||
``` | ||||||
|
||||||
### Java | ||||||
|
||||||
We are using Spotless to format our Java code. To format your code, run the following command within the `data-plane` | ||||||
directory: | ||||||
|
||||||
```shell | ||||||
mvn spotless:apply | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically this is better because we don't require a maven installation
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. omg that's soo fast loll, haven't updated it yet and it got merged. Prow you did a great job There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's all good! |
||||||
``` | ||||||
|
||||||
You can also configure it to your IDE. For more information, please refer | ||||||
to [Spotless](https://github.com/diffplug/spotless). | ||||||
|
||||||
This action is also performed **automatically** when you run `./hack/run.sh generate`. | ||||||
|
||||||
## Teardown | ||||||
|
||||||
### Delete dependencies | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are performed by the formatter.