Skip to content

Commit eb58eb3

Browse files
committed
WIP recover CONTRIBUTING.md
1 parent af2aeb5 commit eb58eb3

1 file changed

Lines changed: 91 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
Contribution Guidelines
2+
=======================
3+
4+
We love to see contributions to the project and have tried to make it easy to
5+
do so, for example by keeping its scope small and the code equally so. If you
6+
wish to contribute code, then please keep to the following guidelines to
7+
ensure consistency within the codebase and that we have happy users.
8+
9+
Philosophy
10+
----------
11+
12+
Our approach to the project is to keep it small and narrowly focused. Expect new
13+
features to be discussed in-depth before being accepted (or rejected). This is
14+
not a framework, but a simple, easy-to-use tool for creating template projects.
15+
It offers useful utility functions to template authors, but nothing more.
16+
17+
Documentation
18+
-------------
19+
20+
If you contribute anything that changes the behaviour of the application,
21+
document it in the README! This includes new features, additional variants
22+
of behaviour and breaking changes.
23+
24+
Make a note of breaking changes in the pull request because they will need
25+
to go into the release notes.
26+
27+
Testing
28+
-------
29+
30+
This project uses [Spock](http://dosc.spockframework.org/) for its tests. Although
31+
any tests are better than none, Spock tests will be looked on more favourably than
32+
other types (such as JUnit). Plus you'll find writing the tests so much nicer!
33+
34+
Unit tests are a nice to have, but it's the integration tests that are critical.
35+
These are run via
36+
37+
./gradlew integTest
38+
39+
and launch the lazybones executable as a separate process. The output is captured
40+
so that you can verify the content. The tests reside in the `src/integTest`
41+
directory and extend `AbstractFunctionalSpec`.
42+
43+
They use [Betamax](http://freeside.co/betamax) to intercept and replay web requests
44+
(such as to the Bintray REST API and download URLs).
45+
46+
Commit messages
47+
---------------
48+
49+
It may seem anal to request a particular format for commit messages, but these
50+
are a historical record of what's happening in the code base and consistency
51+
makes investigating that history much easier.
52+
53+
Please follow the advice of the [Phonegap guys](https://github.com/phonegap/phonegap/wiki/Git-Commit-Message-Format)
54+
when crafting commit messages. The advice basically comes down to:
55+
56+
* First line should be maximum 50 characters long
57+
* It should summarise the change and use imperative present tense
58+
* The rest of the commit message should come after a blank line
59+
* We encourage you to use Markdown syntax in the rest of the commit message
60+
* Preferably keep to an 80 character limit on lines in the rest of the message.
61+
62+
If a commit is related to a particular issue, put the issue number after a
63+
hash (#) somewhere in the detail. You can put the issue number in the first
64+
line summary, but only if you can also fit in a useful summary of what was
65+
changed in the commit.
66+
67+
Here's an example git message:
68+
69+
> Make create's version argument optional.
70+
>
71+
> Implements issue #3. If the user doesn't provide an explicit version,
72+
> lazybones retrieves the latest version from Bintray. Integration tests
73+
> added for the `create` command as well.
74+
75+
Formatting
76+
----------
77+
78+
The rules are simple: use the same formatting as the rest of the code. The
79+
following is a list of the styles we are particularly particular about:
80+
81+
* 4 space indent, no tabs
82+
* a space between if/elseif/catch/etc. keywords and the parenthesis
83+
* elseif/else/catch on their own lines
84+
85+
If in doubt, submit the change and mention in the pull request that you're not
86+
sure about a particular style you used. We'd rather have the contribution and
87+
fix any minor problems than not have the contribution at all.
88+
89+
Ultimately, be aware that the maintainers don't have much time to dedicate to
90+
processing pull requests, so the less work they have to do the more likely and
91+
quickly they can merge those pull requests in.

0 commit comments

Comments
 (0)