Skip to content

Commit

Permalink
Merge pull request #39 from troglobit/reindent-to-linux-coding-style
Browse files Browse the repository at this point in the history
Fix issue #33: Reindent to Linux coding style

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
  • Loading branch information
troglobit committed Oct 25, 2015
2 parents f867a2b + 197e0b1 commit 6e295d4
Show file tree
Hide file tree
Showing 24 changed files with 2,902 additions and 3,036 deletions.
72 changes: 72 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Contributing to libConfuse
==========================

We welcome any and all help in the form of bug reports, fixes, patches
for new features -- *preferably as [GitHub][github] pull requests* --
submitting a pull request practically guarantees inclusion ...


Coding Style
------------

First of all, lines are allowed to be longer than 72 characters these
days. In fact, there exist no enforced maximum, but keeping it around
100/132 characters is OK.

The coding style in libConfuse is Linux [KNF][], detailed [here][style].
To aid developers contributing to the project, source files contain a
trailer of `Local Variables:` used to instruct Emacs to use the correct
indentation mode. There is also a silly little script `indent.sh`,
which is only supposed to serve as a help.

> Always submit code that follows the style of surrounding code!

Commit Messages
---------------

Commit messages exist to track *why* a change was made. Try to be as
clear and concise as possible in your commit messages. Example from
the [Pro Git][gitbook] online book:

Brief, but clear and concise summary of changes

More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as
the subject of an email and the rest of the text as the body. The
blank line separating the ummary from the body is critical (unless
you omit the body entirely); tools like rebase can get confused if
you run the two together.

Further paragraphs come after blank lines.

- Bullet points are okay, too

- Typically a hyphen or asterisk is used for the bullet, preceded
by a single space, with blank lines in between, but conventions
vary here

Signed-off-by: First Lastname <some.email@example.com>


A good *counter* example [is this][rambling] ...


Code of Conduct
---------------

It is expected of everyone engaging in the project to, in the words of
Bill & Ted; be excellent to each other.


[github]: https://github.com/martinh/libconfuse/
[KNF]: https://en.wikipedia.org/wiki/Kernel_Normal_Form
[style]: https://www.kernel.org/doc/Documentation/CodingStyle
[gitbook]: https://git-scm.com/book/ch5-2.html
[rambling]: http://stopwritingramblingcommitmessages.com/

<!--
-- Local Variables:
-- mode: markdown
-- End:
-->
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ Introduction
------------

libConfuse is a configuration file parser library, licensed under the
terms of the [ISC license](http://en.wikipedia.org/wiki/ISC_license),
and written in C. It supports sections and (lists of) values (strings,
integers, floats, booleans or other sections), as well as some other
features (such as single/double-quoted strings, environment variable
expansion, functions and nested include statements). It makes it very
easy to add configuration file capability to a program using a simple
API.
terms of the [ISC license][1], and written in C. It supports sections
and (lists of) values (strings, integers, floats, booleans or other
sections), as well as some other features (such as single/double-quoted
strings, environment variable expansion, functions and nested include
statements). It makes it very easy to add configuration file capability
to a program using a simple API.

The goal of libConfuse is not to be _the_ configuration file parser
library with a gazillion of features. Instead, it aims to be easy to
Expand All @@ -32,7 +31,8 @@ use and quick to integrate with your code.
libConfuse was called libcfg before, but was changed to not confuse with
other similar libraries.

Please report bugs to the GitHub [issue tracker](https://github.com/martinh/libconfuse/issues)
Please report bugs to the GitHub [issue tracker][2]. If you want to
contribute fixes or new features, see the file [CONTRIBUTING.md][3]


Examples
Expand Down Expand Up @@ -127,6 +127,9 @@ News

Copyright &copy; Martin Hedenfalk <[martin.nospam@bzero.se](mailto:martin@bzero.se)>

[1]: http://en.wikipedia.org/wiki/ISC_license
[2]: https://github.com/martinh/libconfuse/issues
[3]: https://github.com/martinh/libconfuse/blob/master/CONTRIBUTING.md
[Travis]: https://travis-ci.org/troglobit/libconfuse
[Travis Status]: https://travis-ci.org/troglobit/libconfuse.png?branch=master
[Coverity Scan]: https://scan.coverity.com/projects/6674
Expand Down

0 comments on commit 6e295d4

Please sign in to comment.