Code Style Guide

Introduction

This page defines the code style and general guidelines for my projects, but you are welcome to follow them in your own 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.

Most of these rules can be applied to all programming languages, although the rules here are targeted at writing C++ code.

1. General

2. Naming

3. Declaration and initialization of variables

4. Functions

5. Includes and headers

6. Error handling

7. Command-line interface

8. Formatting

9. Comments

10. Build and tools

11. Version control

12. Licensing

13. Large Language Model policy

14. Additional notes