Skip to content

Commit dee9b3a

Browse files
committed
CONTRIBUTING.md, CODE_OF_CONDUCT.md
1 parent d2ee009 commit dee9b3a

3 files changed

Lines changed: 129 additions & 0 deletions

File tree

CODE_OF_CONDUCT.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as contributors, maintainers, and participants pledge to make participation in this project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment:
12+
13+
- Demonstrating empathy and kindness toward other people.
14+
- Being respectful of differing opinions, viewpoints, and experiences.
15+
- Giving and gracefully accepting constructive feedback.
16+
- Taking responsibility, apologizing to those affected by our mistakes, and learning from the experience.
17+
- Focusing on what is best for the community and the project.
18+
19+
Examples of unacceptable behavior:
20+
21+
- The use of sexualized language or imagery, and sexual attention or advances of any kind.
22+
- Trolling, insulting or derogatory comments, and personal or political attacks.
23+
- Public or private harassment.
24+
- Publishing others' private information, such as a physical or email address, without explicit permission.
25+
- Other conduct which could reasonably be considered inappropriate in a professional setting.
26+
27+
## Enforcement Responsibilities
28+
29+
Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior they deem inappropriate, threatening, offensive, or harmful.
30+
31+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32+
33+
## Scope
34+
35+
This Code of Conduct applies within all project spaces, and also applies when an individual is officially representing the project in public spaces. Examples include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36+
37+
## Reporting
38+
39+
If you experience or witness unacceptable behavior, report it to the maintainers by opening a private security advisory or by contacting maintainers through repository channels.
40+
41+
All reports will be reviewed and investigated promptly and fairly.
42+
43+
## Enforcement Guidelines
44+
45+
Maintainers may follow these Community Impact Guidelines when determining consequences:
46+
47+
1. Correction
48+
2. Warning
49+
3. Temporary Ban
50+
4. Permanent Ban
51+
52+
## Attribution
53+
54+
This Code of Conduct is adapted from the Contributor Covenant, version 2.1:
55+
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html

CONTRIBUTING.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Contributing to mppx-go
2+
3+
Thanks for contributing to `mppx-go`.
4+
5+
## Before You Start
6+
7+
- Read [README.md](./README.md) for architecture, examples, and package layout.
8+
- Review [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
9+
- Check existing issues and pull requests to avoid duplicate work.
10+
11+
## Development Setup
12+
13+
Requirements:
14+
15+
- Go `1.25+`
16+
17+
Install dependencies and verify the project:
18+
19+
```bash
20+
go mod download
21+
go test ./...
22+
```
23+
24+
## Branches and Pull Requests
25+
26+
1. Fork the repository and create a feature branch from `main`.
27+
2. Make focused changes with clear commit messages.
28+
3. Add or update tests for behavior changes.
29+
4. Run formatting, linting, and tests locally before opening a PR.
30+
5. Open a pull request with:
31+
- a short summary of what changed,
32+
- reasoning behind the change,
33+
- test evidence (command output or explanation),
34+
- any migration notes if relevant.
35+
36+
## Code Style
37+
38+
- Keep public APIs clear and documented.
39+
- Prefer small, composable functions and explicit errors.
40+
- Preserve backward compatibility unless the change is clearly breaking and documented.
41+
42+
Formatting and linting:
43+
44+
```bash
45+
gofmt -w .
46+
golangci-lint run
47+
```
48+
49+
If `golangci-lint` is not installed, install it first:
50+
51+
```bash
52+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
53+
```
54+
55+
## Testing Guidelines
56+
57+
- Add unit tests for all new logic.
58+
- Add regression tests for bug fixes.
59+
- Keep tests deterministic and isolated (no hidden network or external state dependencies unless explicitly needed).
60+
61+
Run:
62+
63+
```bash
64+
go test ./...
65+
```
66+
67+
## License
68+
69+
By contributing, you agree that your contributions are licensed under the project license in [LICENSE](./LICENSE).

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,8 @@ func main() {
254254
go build ./...
255255
go test ./...
256256
```
257+
258+
## Contributing
259+
260+
- [Contributing Guide](./CONTRIBUTING.md)
261+
- [Code of Conduct](./CODE_OF_CONDUCT.md)

0 commit comments

Comments
 (0)