Skip to content

Commit 1e9e5f7

Browse files
authored
chore: Add contributing guidelines (#874)
It's helpful for us Coders to align on a common set of style guidelines. While I'd prefer to automate this, documentation should get us a lot of the way there! Please review these thoroughly, as PRs will be checked against it after merge.
1 parent abddd64 commit 1e9e5f7

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

docs/CONTRIBUTING.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
## Go Style
4+
5+
Contributions must adhere to [Effective Go](https://go.dev/doc/effective_go). Linting rules should
6+
be preferred over documenting styles (run ours with `make lint`); humans are error prone!
7+
8+
Read [Go's Code Review Comments Wiki](https://github.com/golang/go/wiki/CodeReviewComments) to find
9+
common comments made during reviews of Go code.
10+
11+
### No Unused Packages
12+
13+
Coders write packages that are used during implementation. It's difficult to validate whether an
14+
abstraction is valid until it's checked against an implementation. This results in a larger
15+
changeset but provides reviewers with an educated perspective on the contribution.
16+
17+
## Review
18+
19+
> Taken from [Go's review philosophy](https://go.dev/doc/contribute#reviews).
20+
21+
Coders value thorough reviews. Think of each review comment like a ticket: you are expected to
22+
somehow "close" it by acting on it, either by implementing the suggestion or convincing the reviewer
23+
otherwise.
24+
25+
After you update the change, go through the review comments and make sure to reply to every one. You
26+
can click the "Done" button to reply indicating that you've implemented the reviewer's suggestion;
27+
otherwise, click on "Reply" and explain why you have not, or what you have done instead.
28+
29+
It is perfectly normal for changes to go through several round of reviews, with one or more
30+
reviewers making new comments every time and then waiting for an updated change before reviewing
31+
again. All contributors, including experienced maintainers, are subject to the same review cycle;
32+
this process is not meant to be applied selectively or discourage anyone from contribution.

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ $ coder projects update gcp-linux
6464

6565
## Development
6666

67-
The code structure is inspired by [Basics of Unix Philosophy](https://homepage.cs.uri.edu/~thenry/resources/unix_art/ch01s06.html) and [Effective Go](https://go.dev/doc/effective_go).
67+
Read the [contributing docs](./CONTRIBUTING.md) for style and review guidelines.
6868

6969
Coder requires Go 1.18+, Node 14+, and GNU Make.
7070

0 commit comments

Comments
 (0)