source{d} code annotation tool project is GPLv3 licensed and accept contributions via GitHub pull requests. This document outlines some of the conventions on development workflow, commit message formatting, contact points, and other resources to make it easier to get your contribution accepted.
By contributing to this project you agree to the Developer Certificate of Origin (DCO). This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution.
In order to show your agreement with the DCO you should include at the end of commit message,
the following line: Signed-off-by: John Doe <john.doe@example.com>, using your real name.
This can be done easily using the -s flag on the git commit.
The official support channels, for both users and contributors, are:
- GitHub issues*
*Before opening a new issue or submitting a new pull request, it's helpful to search the project - it's likely that another user has already reported the issue you're facing, or it's a known issue that we're already aware of.
Pull Requests (PRs) are the main and exclusive way to contribute to the code-annotation project. In order for a PR to be accepted it needs to pass a list of requirements:
- If the PR is a bug fix, it has to include a new unit test that fails before the patch is merged.
- If the PR is a new feature, it has to come with a suite of unit tests, that tests the new functionality.
- In any case, all the PRs have to pass the personal evaluation of at least one of the maintainers of code-annotation project.
Every commit message should describe what was changed, under which context and, if applicable, the GitHub issue it relates to:
plumbing: packp, Skip argument validations for unknown capabilities. Fixes #623
For convenience, you can create a .env file with all the environment variables described in the README. A template with a sample configuration suitable for development is provided in .env.tpl. You can copy it to .env and set up the variables there.
Note: you will working GitHub OAuth credentials to run the application in development mode, either by setting the environment variables, or through the .env file. In order to be able to use this application while running the tool locally, make sure you use http://127.0.0.1:8080/oauth-callback as the "Authorization callback URL". Please follow the README Installation section for instructions on how to do it.
You should already have Go installed, and properly configured the $GOPATH
go version; # prints your go version
echo $GOPATH; # prints your $GOPATH path
The project must be under $GOPATH, as required by the Go tooling. You should be able to navigate into the source code by running:
cd $GOPATH/src/github.com/src-d/code-annotation
You need also Yarn v1.x.x installed
yarn --version; # prints your Yarn version
You need to satisfy all project requirements, and then run:
$ go get -d -u github.com/src-d/code-annotation/...
$ cd $GOPATH/github.com/src-d/code-annotation
$ make serveThis will start a server locally, which you can access on http://localhost:8080
If you want to benefit from frontend hot reloading feature:
Run server. Execute:
$ make gorunAnd then run frontend in dev mode. Execute:
$ make dev-frontendShortcut to run go run with environment variables
$ make gorun