Skip to content

Commit

Permalink
docs: how to contribute
Browse files Browse the repository at this point in the history
  • Loading branch information
faabiosr committed Sep 5, 2024
1 parent 10121e1 commit 0527106
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# Contributing

By participating to this project, you agree to abide our [code of conduct](/CODE_OF_CONDUCT.md).

## Setup your machine

`echo-middleware` is written in [Go](https://golang.org/).

Prerequisites:

* `make`
* [Go 1.11+](https://golang.org/doc/install)
* [Go 1.21+](https://golang.org/doc/install)
* [GolangCI-Lint](https://github.com/golangci/golangci-lint#install)

Clone `echo-middleware` from source into `$GOPATH`:
Clone `echo-middleware` from source:

```sh
$ mkdir -p $GOPATH/src/github.com/faabiosr
$ cd $GOPATH/src/github.com/faabiosr
$ git clone [email protected]:faabiosr/echo-middleware.git
$ cd echo-middleware
```
Expand All @@ -25,17 +22,16 @@ A good way of making sure everything is all right is running the test suite:
$ make test
```

## Formatting the code
Format the code running:
```console
$ make fmt
```

## Create a commit

Commit messages should be well formatted.
### Commit message format and code base

Commit messages should be well formatted (please use [gofumpt](https://github.com/mvdan/gofumpt)), and must follow the [Conventional Commits](https://www.conventionalcommits.org) specification, this pattern was defined to help with new version releases.

Start your commit message with the type. Choose one of the following:
`feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, `revert`, `add`, `remove`, `move`, `bump`, `update`, `release`

You should give the message a title, starting with uppercase and ending without a dot.
After a colon, you should give the message a title, starting with uppercase and ending without a dot.
Keep the width of the text at 72 chars.
The title must be followed with a newline, then a more detailed description.

Expand All @@ -44,7 +40,7 @@ Please reference any GitHub issues on the last line of the commit message (e.g.
An example:

```
Add example for --release-notes flag
docs: add example for --release-notes flag
I added an example to the docs of the `--release-notes` flag to make
the usage more clear. The example is an realistic use case and might
Expand All @@ -55,5 +51,4 @@ See #284

## Submit a pull request

Push your branch to your `echo-middleware` fork and open a pull request against the
master branch.
Push your branch to your `echo-middleware` fork and open a pull request against the main branch.

0 comments on commit 0527106

Please sign in to comment.