...
1# Developing go-jsonschema
2
3* [Development Setup](#setup)
4* [Commit Message Guidelines](#commits)
5* [Writing Documentation](#documentation)
6
7## <a name="setup"> Development Setup
8
9This document describes how to set up your development environment to build and test jsonschema
10
11### Installing Dependencies
12
13Before you can build jsonschema, you must install and configure the following dependencies on your
14machine:
15
16* [Git](http://git-scm.com/): The [Github Guide to
17 Installing Git][git-setup] is a good source of information.
18
19* [The Go Programming Language](https://golang.org): see golang.org to get started
20
21### Forking jsonschema on Github
22
23To contribute code to jsonschema, you must have a GitHub account so you can push code to your own
24fork of jsonschema and open Pull Requests in the [GitHub Repository][github].
25
26To create a Github account, follow the instructions [here](https://github.com/signup/free).
27Afterwards, go ahead and [fork](http://help.github.com/forking) the
28[jsonschema frontend repository][github].
29
30### Building jsonschema
31
32To build jsonschema, you clone the source code repository and use Yarn to run the electron app:
33
34```shell
35# Clone your Github repository:
36git clone https://github.com/<github username>/jsonschema.git
37
38# Go to the jsonschema directory:
39cd jsonschema
40
41# Build the qri binary
42go install
43```
44
45
46## <a name="commits"></a> Git Commit Guidelines
47
48We have very precise rules over how our git commit messages can be formatted. This leads to **more
49readable messages** that are easy to follow when looking through the **project history**. But also,
50we use the git commit messages to **generate the Qri change log**.
51
52### Commit Message Format
53Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
54format that includes a **type**, a **scope** and a **subject**:
55
56```
57<type>(<scope>): <subject>
58<BLANK LINE>
59<body>
60<BLANK LINE>
61<footer>
62```
63
64The **header** is mandatory and the **scope** of the header is optional.
65
66Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
67to read on GitHub as well as in various git tools.
68
69### Revert
70If the commit reverts a previous commit, it should begin with `revert: `, followed by the header
71of the reverted commit.
72In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit
73being reverted.
74A commit with this format is automatically created by the [`git revert`][git-revert] command.
75
76### Type
77Must be one of the following:
78
79* **feat**: A new feature
80* **fix**: A bug fix
81* **docs**: Documentation only changes
82* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
83 semi-colons, etc)
84* **refactor**: A code change that neither fixes a bug nor adds a feature
85* **perf**: A code change that improves performance
86* **test**: Adding missing or correcting existing tests
87* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
88 generation
89
90### Scope
91The scope could be anything specifying place of the commit change. For example **NEED TO MAKE DECISION ABOUT THIS** , etc...
92
93You can use `*` when the change affects more than a single scope.
94
95### Subject
96The subject contains succinct description of the change:
97
98* use the imperative, present tense: "change" not "changed" nor "changes"
99* don't capitalize first letter
100* no dot (.) at the end
101
102### Body
103Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
104The body should include the motivation for the change and contrast this with previous behavior.
105
106### Footer
107The footer should contain any information about **Breaking Changes** and is also the place to
108[reference GitHub issues that this commit closes][closing-issues].
109
110**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
111The rest of the commit message is then used for this.
112
113A detailed explanation can be found in this [document][commit-message-format].
114
115
116[closing-issues]: https://help.github.com/articles/closing-issues-via-commit-messages/
117[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
118[git-revert]: https://git-scm.com/docs/git-revert
119[git-setup]: https://help.github.com/articles/set-up-git
120[github]: https://github.com/qri-io/frontend
121[style]: https://standardjs.com
122[yarn-install]: https://yarnpkg.com/en/docs/install
123
124
125###### This documentation has been adapted from the [Data Together](https://github.com/datatogether/datatogether), [Hyper](https://github.com/zeit/hyper), and [AngularJS](https://github.com/angular/angularJS) documentation, all of which are projects we :heart:
View as plain text