Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Contributing to libshared

Code contributions are only accepted as pull-requests.
In general your contributions have to be associated with an issue on our [GitHub issue tracker](https://github.com/GothenburgBitFactory/libshared/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen).

Any code contributions should have sufficient test coverage.

When writing bug-fixes, first write a test to confirm it, then add the commit to fix it.
When implementing a feature, make sure its behavior is defined by tests.

Tests are likely the most useful contributions of all, because they not only improve the quality of the code, but prevent future regressions, therefore maintaining quality of subsequent releases.

Nevertheless, all code has to adhere to the coding style guidelines and project architecture.
See the respective section below.

If you want to go the extra mile, update the ChangeLog and add your name to the AUTHORS file in the right place.

By contributing, you are declaring that you have the right to submit the code under the project licensing terms.
Therefore, commits should be signed off according to the [DCO](DCO) (use `-s` / `--signoff` flag when committing).

## Coding style

The general guideline is simply this:

> Make all changes and additions such that they blend in perfectly with the surrounding code, so it looks like only one person worked on the source, and that person is rigidly consistent.

To be a little more explicit, the common elements across the languages are:

* Indent code using two spaces, no tabs
* With Python, follow PEP8 as much as possible
* Surround operators and expression terms with a space
* No cuddled braces
* No need to stick slavishly to 80 characters per line, but do not make them overly long (rule of thumb: *One sentence/statement per line*)!
* Class names are capitalized, variable names are not

We target Python 3 so that our test suite runs on the broadest set of platforms.

We can safely target C++17 because all the default compilers on our supported platforms are ready.
Feel free to use C++20 provided that all build platforms support this.
48 changes: 48 additions & 0 deletions DCO
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Sign your work - the Developer's Certificate of Origin
The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as an open-source patch.
The rules are pretty simple: if you can certify the below (from developercertificate.org):

> Developer's Certificate of Origin 1.1
>
> By making a contribution to this project, I certify that:
>
> (a) The contribution was created in whole or in part by me and I
> have the right to submit it under the open source license
> indicated in the file; or
>
> (b) The contribution is based upon previous work that, to the best
> of my knowledge, is covered under an appropriate open source
> license and I have the right under that license to submit that
> work with modifications, whether created in whole or in part
> by me, under the same open source license (unless I am
> permitted to submit under a different license), as indicated
> in the file; or
>
> (c) The contribution was provided directly to me by some other
> person who certified (a), (b) or (c) and I have not modified
> it.
>
> (d) I understand and agree that this project and the contribution
> are public and that a record of the contribution (including all
> personal information I submit with it, including my sign-off) is
> maintained indefinitely and may be redistributed consistent with
> this project or the open source license(s) involved.

#### DCO Sign-Off Methods

The DCO requires a sign-off message in the following format appear on each commit in the pull request:

> Signed-off-by: Random J Developer <random@developer.example.org>

using your real name (sorry, no pseudonyms or anonymous contributions.)

The DCO text can either be manually added to your commit body, or you can add either **-s** or **--signoff** to your usual git commit commands.
If you forget to add the sign-off you can also amend a previous commit with the sign-off by running **git commit --amend -s**.
If you've pushed your changes to GitHub already you'll need to force push your branch after this with **git push -f**.


#### Alternative Sign-Off Methods in rare cases

If it is really no option for you to disclose your real name and email address, there might be a chance that you can get your contribution accepted.
In this case please contact the maintainers directly and verify the adherence to the DCO of the contribution manually.
This might include quite some legal overhead for both parties.
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
libshared
=========
# libshared

A git submodule used by multiple projects. Not to be released or packaged
independently. All project tarballs will include libshared, so this is a
development-only internal project.
A Git submodule used by multiple projects, mainly Taskwarrior and Timewarrior.
Not to be released or packaged independently.

Branching
---------
All project tarballs will include libshared, so this is a development-only internal project.

Development for libshared is done on the master branch only.
# Development

Each time a project is released that uses libshared, an appropriate tag is
added to the corresponding commit.
Development for libshared is done on the `master` branch only.
See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute.

A project may choose to release with any libshared commit.
Each time a project is released that uses libshared, an appropriate tag is added to the corresponding commit.

---
A project may choose to release with any libshared commit.