Skip to content

Commit 8ac8dab

Browse files
committed
Add linting target, link to the code of conduct, flesh out the style and review guidelines
Signed-off-by: timflannagan <[email protected]>
1 parent 35694e0 commit 8ac8dab

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

CONTRIBUTING.md

+23-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# How to contribute
22

3-
Operator Lifecycle Manager (OLM) is an Apache 2.0 licensed project and accepts contributions via GitHub pull requests. This document outlines some of the conventions on commit message formatting, contact points for developers, and other resources to help get contributions into the OLM project.
3+
Operator Lifecycle Manager (OLM) is an Apache 2.0 licensed project and accepts contributions via GitHub pull requests (PRs).
4+
5+
This document outlines some of the conventions on commit message formatting, contact points for developers, and other resources to help get contributions into the OLM project.
46

57
## Communication
68

@@ -12,12 +14,15 @@ Operator Lifecycle Manager (OLM) is an Apache 2.0 licensed project and accepts c
1214

1315
- Fork the repository on GitHub
1416
- See the [developer guide](./DEVELOPMENT.md) for build instructions
17+
- Read the [code of conduct](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/code-of-conduct.md)
1518

1619
## Reporting bugs and creating issues
1720

1821
Reporting bugs is one of the best ways to contribute. However, a good bug report has some very specific qualities, so please read over our short document on [reporting bugs](./doc/dev/reporting_bugs.md) before submitting a bug report. Before filing a bug report, ensure the bug hasn't already been reported by searching through the OLM project [Issues][issues].
1922

20-
Any new contribution should be accompanied by a new or existing issue. This issue can help track work, discuss the design and implementation, and help avoid wasted efforts or multiple people working on the same issue, compared to submitting a PR first. Trivial changes, like fixing a typo in the documentation, do not require the creation of a new issue. Proposing larger changes to the OLM project may require an enhancement be created in the [operator-framework/enhancements](https://github.com/operator-framework/enhancements/) repository.
23+
Any new contribution should be accompanied by a new or existing issue. This issue can help track work, discuss the design and implementation, and help avoid wasted efforts or multiple people working on the same issue, compared to submitting a PR first. Trivial changes, like fixing a typo in the documentation, do not require the creation of a new issue.
24+
25+
Proposing larger changes to the OLM project may require an enhancement be created in the [operator-framework/enhancements](https://github.com/operator-framework/enhancements/) repository. Enhancements are the primary mechanism for proposing new features to the OLM codebase. Any change to OLM's behavior or existing features, APIs, or architectural changes to the testing harness likely require an enhancement.
2126

2227
## Contribution flow
2328

@@ -36,27 +41,34 @@ Thanks for contributing!
3641

3742
### Code Review
3843

39-
<!--
40-
TODO(tflannag): Call out the need to run `make verify` locally for relevant codepaths.
41-
-->
44+
<!-- TODO(tflannag): value of self documenting code -->
45+
46+
Contributing PRs with a reasonable title and description can go a long way with helping ease the burden of the review process.
4247

43-
Each PR must be labeled with at least one "lgtm" label and at least one "approved" label before it can be merged.
48+
It can be helpful after submitting a PR to self-review the changes yourself. This allows you to communicate sections that reviewers should spend time combing over, asking for feedback on a particular implementation, or providing justification for a set of changes in-line ahead of time.
4449

45-
Maintainers that have approval permissions are listed in the "approvers" column in the root [OWNERS][owners] file.
50+
When opening PRs that are in a rough draft or WIP state, prefix the PR description with `WIP: ...` or create a draft PR. This can help save reviewer's time communicating the state of a PR ahead of time. Draft/WIP PRs can be a good way to get early feedback from reviewers on the implementation, focusing less on smaller details, and more on the general approach of changes.
51+
52+
When contributing changes that require a new dependency, check whether it's feasable to directly vendor that code [without introducing a new dependency](https://go-proverbs.github.io/).
53+
54+
Each PR must be labeled with at least one "lgtm" label and at least one "approved" label before it can be merged. Maintainers that have approval permissions are listed in the "approvers" column in the root [OWNERS][owners] file.
4655

4756
### Code style
4857

49-
The coding style suggested by the Golang community is used in the OLM project. See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details.
58+
The coding style suggested by the Golang community is used throughout the OLM project:
59+
60+
- CodeReviewComments <https://github.com/golang/go/wiki/CodeReviewComments>
61+
- EffectiveGo: <https://golang.org/doc/effective_go>
5062

51-
In addition to the linked style documentation, OLM formats Golang packages using the `go fmt` tool. Before submitting a PR, please run `go fmt ...` on relevant packages and commit the results. This will help expedite the review process, focusing less on style conflicts, and more on the design and implementation details.
63+
In addition to the linked style documentation, OLM formats Golang packages using the `go fmt` and [`goimports`][goimports] tooling. Before submitting a PR, please run `make lint` locally and commit the results. This will help expedite the review process, focusing less on style conflicts, and more on the design and implementation details.
5264

5365
Please follow this style to make the OLM project easier to review, maintain and develop.
5466

5567
### Sign-off ([DCO][DCO])
5668

5769
A [sign-off][sign-off] is a line towards the end of a commit message that certifies the commit author(s).
5870

59-
For more information on the structuring of commit messages, read the information in the [DCO][https://github.com/apps/dco] application that the OLM projects uses.
71+
For more information on the structuring of commit messages, read the information in the [DCO](https://github.com/apps/dco) application that the OLM projects uses.
6072

6173
## Documentation
6274

@@ -72,3 +84,4 @@ The OLM documentation mainly lives in the [operator-framework/olm-docs][olm-docs
7284
[olm-dev]: <https://kubernetes.slack.com/archives/C0181L6JYQ2>
7385
[olm-wg]: <https://docs.google.com/document/d/1Zuv-BoNFSwj10_zXPfaS9LWUQUCak2c8l48d0-AhpBw/edit?usp=sharing>
7486
[sign-off]: <https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff>
87+
[goimports]: <https://pkg.go.dev/golang.org/x/tools/cmd/goimports>

0 commit comments

Comments
 (0)