Skip to content

Commit ec4d2d3

Browse files
committed
Add CONTRIBUTING.md
1 parent 7d1676b commit ec4d2d3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

CONTRIBUTING.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# How to contribute
2+
3+
Thank you for reading this, this project is open and my only wish is to make it better.
4+
5+
Before you get started, be aware that I'm not a Go expert and still in the learning curve. I believe some pieces of this software could be done in a more idiomatic and elegant way, and my desire is to learn from more experienced Go engineers.
6+
7+
## Testing
8+
9+
This project is heavily tested: coverage near 100% and I would like to keep it that way. If some code is not testable, this probably means the design is not right.
10+
11+
How to test the coverage?
12+
13+
```bash
14+
go test ./... -count=1 -coverprofile=coverage.txt -covermode=atomic
15+
```
16+
17+
Then, visualize the coverage report:
18+
19+
```bash
20+
go tool cover -html=coverage.txt
21+
```
22+
23+
## Linting
24+
25+
This projects uses the tool [golangci-lint](https://golangci-lint.run/). You can [install it locally](https://golangci-lint.run/usage/install/#local-installation) and run it before you commit your code.
26+
27+
You may adapt the configuration to improve the standard but avoid lowering it.

0 commit comments

Comments
 (0)