Product SiteDocumentation Site

Pacemaker Development

Working with the Pacemaker Code Base

Edition 1

Andrew Beekhof

Co-author 
Red Hat

Ken Gaillot

Co-author 
Red Hat

Legal Notice

Copyright © 2009-2016 Andrew Beekhof.
The text of and illustrations in this document are licensed under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA")[1].
In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
In addition to the requirements of this license, the following activities are looked upon favorably:
  1. If you are distributing Open Publication works on hardcopy or CD-ROM, you provide email notification to the authors of your intent to redistribute at least thirty days before your manuscript or media freeze, to give the authors time to provide updated documents. This notification should describe modifications, if any, made to the document.
  2. All substantive modifications (including deletions) be either clearly marked up in the document or else described in an attachment to the document.
  3. Finally, while it is not mandatory under this license, it is considered good form to offer a free copy of any hardcopy or CD-ROM expression of the author(s) work.

Abstract

This document has guidelines and tips for developers interested in editing Pacemaker source code and submitting changes for inclusion in the project.

Table of Contents

1. Frequently Asked Questions
2. C Coding Guidelines
2.1. C Boilerplate
2.2. Formatting
2.2.1. Whitespace
2.2.2. Line Length
2.2.3. Pointers
2.2.4. Functions
2.2.5. Control Statements (if, else, while, for, switch)
2.2.6. Operators
2.3. Naming Conventions
2.4. vim Settings
3. Python Coding Guidelines
3.1. Python Boilerplate
3.2. Python Compatibility
3.2.1. Python Future Imports
3.2.2. Other Python Compatibility Requirements
3.2.3. Python Usages to Avoid
3.3. Formatting Python Code
A. Revision History
Index