-
-
Notifications
You must be signed in to change notification settings - Fork 65
Contributing
Patches and pull-requests (normally against the master branch) should be submitted either as a pull-request here on github or as a patch (or series of) to:
Useful resources on how to contribute to a project using git can be found in the git-book Contributing to a Project, specifically the part about format-patch and the workflow for using different branches (these will form a pull-request if you choose that path).
Contributions in the form of testing and documentation is also very welcome.
All contributions must be made under the GNU GPL v3 licence or later.
This project adheres to: http://contributor-covenant.org/version/1/4/
Please follow the Style as well as the general conventions in the source code.
We use the Boost Test suite, refer to the test/ directory for how to set up a test. The test_generic may serve as a starting point. Remember to add the test to test/.gitignore and tests/CMakeLists.txt.
Code completion in Vim using YouCompleteMe
cmake -H. -Bbuild -GNinja # makes compile_commands.json
ln -s build/compile_commands.json . # symlink to source root
If you need to test a pull request that fixes some issue or implements a feature, you clone the repository from the author and check out the feature branch:
$ git clone https://github.com/gauteh/astroid # you might have done this already
$ cd astroid.git
$ git pull # or git pull --force in case something broke the history
usually you are on the master
branch. But if you want to check out feature1
do:
$ git checkout feature1
$ git pull # maybe add --force
$ cmake -H. -Bbuild -GNinja # if you already have a build dir, this step is not necessary
$ cd build
$ ninja # will re-configure if necessary
$ ninja test # will run tests
$ cd ..
$ build/astroid --no # run the just built astroid bin without automatic polling
whenever you have done a new pull, recompile with:
$ cmake -H. -Bbuild -GNinja # if you do not already have a build dir
$ cd build
$ ninja
or just $ ninja -C build
.
to go back to the master branch (or update the master branch) do:
$ git checkout master
$ git pull # make sure it's up-to-date
$ ninja -C build # recompile master branch
$ ninja -C build test
Always make sure that tests pass before submitting a pull-request.