From 049d2d9eda15e6e18cef996f73176ca3b50c8502 Mon Sep 17 00:00:00 2001 From: northernSage Date: Thu, 25 Feb 2021 07:21:37 -0300 Subject: [PATCH 1/4] add initial docs --- .gitignore | 4 +++ CHANGELOG.md | 1 + README.md | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 CHANGELOG.md diff --git a/.gitignore b/.gitignore index daf913b..0dd5628 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.o *.a *.so +*.out # Folders _obj @@ -22,3 +23,6 @@ _testmain.go *.exe *.test *.prof + +# test editor files +*.swp diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1bc4a9c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +## Release 0.1.0 (UNRELEADED) diff --git a/README.md b/README.md index ea9109a..aafec85 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,72 @@ A Golang Matrix client. **THIS IS UNDER ACTIVE DEVELOPMENT: BREAKING CHANGES ARE FREQUENT.** + +# Contributing + +All contributions are greatly appreciated! + +## How to report issues + +Obs. it's important to 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 + + `/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` + From fffd6ae42688873dcda4140b6295f80789042105 Mon Sep 17 00:00:00 2001 From: northernSage Date: Thu, 25 Feb 2021 07:25:59 -0300 Subject: [PATCH 2/4] fix formatting --- README.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index aafec85..abff845 100644 --- a/README.md +++ b/README.md @@ -28,48 +28,45 @@ If you intend to contribute to gomatrix you'll first need Go installed on your m - 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` + 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 - `/hooks/pre-commit` + /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` + $ 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` +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` + 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` + go tool cover -html=coverage.out From e6877ae9c8120cfe9ebe636da254c41d726a459b Mon Sep 17 00:00:00 2001 From: Kegsay Date: Wed, 24 Mar 2021 16:18:25 +0000 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bc4a9c..b6a9a16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -## Release 0.1.0 (UNRELEADED) +## Release 0.1.0 (UNRELEASED) From dbffaa2b281d474682f70dedb9c632614e95b4f5 Mon Sep 17 00:00:00 2001 From: Kegsay Date: Wed, 24 Mar 2021 16:18:30 +0000 Subject: [PATCH 4/4] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index abff845..a083b46 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ All contributions are greatly appreciated! ## How to report issues -Obs. it's important to check the current open issues for similar reports +Please check the current open issues for similar reports in order to avoid duplicates. Some general guidelines: @@ -69,4 +69,3 @@ To run coverage, first generate the coverage report using `go test` You can now show the generated report as a html page with `go tool` go tool cover -html=coverage.out -