3 We welcome contributions in several forms, e.g.
5 - Improve end user documenting on the [Wiki](https://github.com/fossology/fossology/wiki)
9 - e.g. by using an instant version of FOSSology with [vagrant](https://github.com/fossology/fossology/wiki/vagrant)
11 - Write unit tests and learn how the code works
13 - Verify available [patches (pull requests)](https://github.com/fossology/fossology/pulls)
15 - Working on [issues](https://github.com/fossology/fossology/issues)
24 FOSSology uses GitHub's issue tracker. All bugs and enhancements should be
25 entered so that we don't lose track of them, can prioritize, assign, and so code
26 fixes can refer to the bug number in its check-in comments.
28 The issue usually contains much more detail (including test cases) than can be
29 reasonably put in check-in comments, so being able to correlate the two is
32 Consider the usual best practice for writing issues, among them:
34 - More verbosity rather than one liners
35 - Screenshots are a great help
36 - Providing example files (in case for example scanning crashes)
37 - Please determine the version, better the commit id
38 - Details on operating system you are using
42 follow the [Coding Style](https://github.com/fossology/fossology/wiki/Coding-Style)
46 Not familiar with git, see [Git basic commands](https://github.com/fossology/fossology/wiki/Git-basic-commands)
50 We are using the [Feature Branch Workflow (also known as GitHub Flow)](https://guides.github.com/introduction/flow/),
51 and prefer delivery as pull requests.
53 Our first line of defense is the [Travis CI](https://travis-ci.org/fossology/fossology/) build defined within [.travis.yml](.travis.yml) and triggered for every pull request.
55 Create a feature branch:
58 git checkout -B feat/tune-vagrant-vm
63 The cardinal rule for creating good commits is to ensure there is only one
64 "logical change" per commit. Why is this an important rule?
66 - The smaller the amount of code being changed, the quicker & easier it is to
67 review & identify potential flaws.
69 - If a change is found to be flawed later, it may be necessary to revert the
70 broken commit. This is much easier to do if there are not other unrelated
71 code changes entangled with the original commit.
73 - When troubleshooting problems using Git's bisect capability, small well
74 defined changes will aid in isolating exactly where the code problem was
77 - When browsing history using Git annotate/blame, small well defined changes
78 also aid in isolating exactly where & why a piece of code came from.
80 Things to avoid when creating commits
82 - Mixing whitespace changes with functional code changes.
83 - Mixing two unrelated functional changes.
84 - Sending large new features in a single giant commit.
86 ### Git Commit Conventions
88 We use git commit as per [Conventional Changelog](https://github.com/ajoslin/conventional-changelog):
91 <type>(<scope>): <subject>
97 feat(vagrant): increase upload size
102 - **feat**: A new feature
104 - **docs**: Documentation only changes
105 - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, newline, line endings, etc)
106 - **refactor**: A code change that neither fixes a bug or adds a feature
107 - **perf**: A code change that improves performance
108 - **test**: Adding missing tests
109 - **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
111 You can add additional details after a new line to describe the change in detail or automatically close a issue on Github.
114 feat(CONTRIBUTING.md): create initial CONTRIBUTING.md
116 makes the following wiki Page obsolete:
117 - https://github.com/fossology/fossology/wiki/Reporting-bugs
122 > **NOTE:** [CHANGELOG.md](CHANGELOG.md) is generated based on the commits.
124 ### Developer Certificate of Origin (DCO)
126 All commits not submitted via GitHub pull request shall contain a
127 Signed-off-by line, also known as the **Developer Certificate of Origin (DCO)**
128 as we know it from the Linux Kernel [Documenation/SubmittingPatches](https://www.kernel.org/doc/Documentation/SubmittingPatches)
131 Signed-off-by: Peace Fun Ingenium <peacefun.ingenium@example.com>
134 Additional tags in addition to Signed-off-by shall be used as long as it makes
135 sense for any commit, e.g.
148 Pull requests with patches, improvements, new features are a great help.
149 Please keep them clean from unwanted commits.
151 Follow the steps to get your work included in the project.
153 1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork,
154 and add the fossology remote:
157 # Clone your fork of the repo into the current directory
158 git clone https://github.com/<your-username>/fossology.git
159 # Navigate to the cloned directory
161 # Assign the original repo to a remote called "upstream"
162 git remote add upstream https://github.com/fossology/fossology.git
165 2. Get the latest changes from upstream:
169 git pull upstream master
172 3. Create a new branch from the main master branch to contain your changes.
173 Best way is to call is to follow the type described in **Git Commit Conventions**
174 stated above: `<githubId>/#<issueNr>/<description/scope/topic>`
177 git checkout -b <topic-branch-name>
183 git checkout -b john/138/buckets-undefined-index
189 git checkout -b john/fix/138
193 Please respect the coding convention: [Coding guidelines](https://github.com/fossology/fossology/wiki/Coding-Style)
195 Commit your changes in logical chunks. Please adhere to **Git Commit Conventions**
196 and [Coding guidelines](https://github.com/fossology/fossology/wiki/Coding-Style)
197 or your code is unlikely be merged into the main project.
198 Use Git's [interactive rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase)
199 feature to tidy up your commits before making them public.
201 5) Locally rebase the upstream master branch into your topic branch:
204 git pull --rebase upstream master
207 6) Push your topic branch up to your fork:
210 git push origin <topic-branch-name>
213 7) [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
214 with a clear title and description against the `master` branch.
218 The FOSSology project does not require you to assign the copyright of your
219 contributions, you retain the copyright. The FOSSology project **does** require
220 that you make your contributions available under the
221 [GNU General Public License as published by the Free Software Foundation, version 2](LICENSE),
222 in order to be accepted as contribution in the main repo.
224 If appropriate, include the [GPLv2 license header](https://github.com/fossology/fossology/wiki/Coding-Style#default-license-and-file-headers)
225 at the top of each file along with the copyright info. If you are adding a new
226 file that you wrote, include your name in the copyright notice in the license