Contributing Patches

From TapiWiki

Jump to: navigation, search

Contents

[edit] Before you start coding

If you haven't started coding yet, here are some advices. If you have a specific feature you want to implement, you may want to check with the developers if no one is implementing it yet. They might also give you extra tips on how to implement it, which will help in getting your patches coded and accepted faster.

If you don't know what to implement, but want to help out, you can go through #tapioca-voip IRC channel on freenode and talk to the developers, or you can send a mail to the development mailing list.

[edit] Code documentation

In order to make it easy to understand Tapioca code, documented patches has more chances to go. The Tapioca sources right now are not completelly documented, so if you want to contribute with documentation too, you are more than welcome.

[edit] Code conventions

[edit] Indentation and documentation

  • NO TABS, use SPACES instead. Number of spaces -> 4.
  • Maximum line width of 80 columns. This means multiline is your friend sometimes.
  • Comments should use doxygen style syntax
  • Always use /* */ type comments, no //

[edit] Naming

  • Variable and function names are lowercase, words separated by underscores. eg.: tapioca_create_connection ().
  • Type names (structs, enums, typedefs) are as follows: no underscores, words stuck together, capitalise the first letters of words. eg: TapiocaError

[edit] Where to put spaces

Always put spaces:

  • after commas, semicolon
  • before parenthesis
  • after and before operators

[edit] Source header

All sources should begin with the standard header:

/*
 * Copyright (C) 2005 Copyright_Holder
 * @author Author Name <author email>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

Author credits should be added in chronological order

[edit] Submitting your patch

  1. Open a bug or use an existing one on the Bugtrack System and upload the patch there.
  2. Announce the patch on the development mailing list to get attention and testing from other people.

If your patch is ok, we will be happy to integrate it upstream.

[edit] Getting the sources

Ready? See Installation Guide#Installing from source on how to get (hopefully all) the needed sources.

Personal tools