From f12aff6228e76ebbb2a7e510e7b644c8c780321b Mon Sep 17 00:00:00 2001 From: adrianc Date: Thu, 3 Apr 2025 08:47:51 +0300 Subject: [PATCH] add CONTRIBUTING guide define contributing guide with general guidelines. Signed-off-by: adrianc --- CONTRIBUTING.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..9121dc4c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,41 @@ +# Contribution Guidelines + +netlink accepts contributions via GitHub pull request(PR). This document outlines some of the conventions on how to contribute +code to the project. + +## General + +* One commit per PR. +* A PR covers a single area/functionality (e.g extension of devlink command and link command should go in separate PRs). +* Each PR should be covered by unit tests when applicable. +* The goal of Netlink package is to follow iproute2 behavior. When in doubt refer to iproute2 [source code](https://github.com/iproute2/iproute2). + +## Code Style + +Please follows the standard formatting recommendations and language idioms set out in [Effective Go](https://golang.org/doc/effective_go.html) +and in the [Go Code Review Comments wiki](https://github.com/golang/go/wiki/CodeReviewComments). + +## Commit Message Style + +Each commit is expected to comply with the following format: + +``` +Change summary + +More detailed explanation of your changes: Why and how. +Wrap it to 72 characters. +See [here] (https://chris.beams.io/posts/git-commit/) +for some more good advices. +``` + +For example: + +``` +Fix poorly named identifiers + +One identifier, fnname, in func.go was poorly named. It has been renamed +to fnName. Another identifier retval was not needed and has been removed +entirely. +``` + +> __Note:__ [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) style is not enforced however is allowed