Skip to content

Commit

Permalink
docs: move coding conventions into contributing.md (#1751)
Browse files Browse the repository at this point in the history
Move Go coding conventions from the README.md into the CONTRIBUTING.md file which discusses other requirements for code contributed.

I'm in the process of adding a developing document that includes finer details about how to do things like add dependencies, update them, remove them, as part of the previous work switching to Modules (#1634). I noticed during that work that this section is in the projects readme but is primarily listing more things that someone contributing should be thinking about, and not so much someone who is browsing or importing the repository. It makes more sense for this to live in the contributing document.
  • Loading branch information
leighmcculloch authored Sep 16, 2019
1 parent 7b83a49 commit 79de7e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ Check out the [Stellar Contribution Guide](https://github.com/stellar/docs/blob/

* Use `gofmt` or preferably `goimports` to format code
* Follow [Effective Go](https://golang.org/doc/effective_go.html) and [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)

### Go Coding conventions

- Always document exported package elements: vars, consts, funcs, types, etc.
- Tests are better than no tests.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ Generally, file contents are sorted by exported/unexported, then declaration typ

Often, we provide test packages that aid in the creation of tests that interact with our other packages. For example, the `support/db` package has the `support/db/dbtest` package underneath it that contains elements that make it easier to test code that accesses a SQL database. We've found that this pattern of having a separate test package maximizes flexibility and simplifies package dependencies.

### Contributing

## Coding conventions

- Always document exported package elements: vars, consts, funcs, types, etc.
- Tests are better than no tests.
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.

0 comments on commit 79de7e0

Please sign in to comment.