Code Style Guide

Introduction

This page defines code style guidelines for my projects, but you are welcome to follow them in your projects as well :)

The rules here are loosely based on both the Linux kernel coding style as well as GNU Coding Standards, with tweaks based on my personal preferences (for both my sanity and readability, some GNU rules are actually insane).

Most of these rules can be applied to all programming languages, although the main target is modern C and C++.

1. General

2. Naming

3. Declaration and initialization of variables

4. Functions

5. Includes and headers

6. Error handling

7. CLI

8. Formatting

9. Comments

10. Build and tools

11. Version control

12. Licensing