Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #85 from northernSage/add-contributing-guidelines
Browse files Browse the repository at this point in the history
Add contributing section to README.md
  • Loading branch information
kegsay authored Mar 24, 2021
2 parents 7dd5e2a + dbffaa2 commit ec4a104
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.o
*.a
*.so
*.out

# Folders
_obj
Expand All @@ -22,3 +23,6 @@ _testmain.go
*.exe
*.test
*.prof

# test editor files
*.swp
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Release 0.1.0 (UNRELEASED)
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,68 @@
A Golang Matrix client.

**THIS IS UNDER ACTIVE DEVELOPMENT: BREAKING CHANGES ARE FREQUENT.**

# Contributing

All contributions are greatly appreciated!

## How to report issues

Please check the current open issues for similar reports
in order to avoid duplicates.

Some general guidelines:

- Include a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) when possible.
- Describe the expected behaviour and what actually happened
including a full trace-back in case of exceptions.
- Make sure to list details about your environment

## Setting up your environment

If you intend to contribute to gomatrix you'll first need Go installed on your machine (version 1.12+ is required). Also, make sure to have golangci-lint properly set up since we use it for pre-commit hooks (for instructions on how to install it, check the [official docs](https://golangci-lint.run/usage/install/#local-installation)).

- Fork gomatrix to your GitHub account by clicking the [Fork](https://github.com/matrix-org/gomatrix/fork) button.
- [Clone](https://help.github.com/en/articles/fork-a-repo#step-2-create-a-local-clone-of-your-fork) the main repository (not your fork) to your local machine.

$ git clone https://github.com/matrix-org/gomatrix
$ cd gomatrix

- Add your fork as a remote to push your contributions.Replace
``{username}`` with your username.

git remote add fork https://github.com/{username}/gomatrix

- Create a new branch to identify what feature you are working on.

$ git fetch origin
$ git checkout -b your-branch-name origin/master

- Make your changes, including tests that cover any code changes you make, and run them as described below.

- Execute pre-commit hooks by running

<gomatrix dir>/hooks/pre-commit

- Push your changes to your fork and [create a pull request](https://help.github.com/en/articles/creating-a-pull-request) describing your changes.

$ git push --set-upstream fork your-branch-name

- Finally, create a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)

## How to run tests

You can run the test suite and example code with `$ go test -v`

# Running Coverage

To run coverage, first generate the coverage report using `go test`

go test -v -cover -coverprofile=coverage.out

You can now show the generated report as a html page with `go tool`

go tool cover -html=coverage.out

0 comments on commit ec4a104

Please sign in to comment.