Code Style Guide
This document establishes the basic guidelines and recommendations for C and C++ programming styles within srsRAN Project code base. Many of the guidelines are C++ specific, however some can still be applied to C. The main goal of this document is to help establish a consistent programming style throughout srsRAN Project code base, and improve the readability and maintainability of code committed by users.
This document is heavily inspired in LLVM’s coding standards, please refer to this if you would like to take a further look into coding standards and best practices.
Contents:
📄️ Language and libraries
C & C++ version
📄️ Mechanical source aspects
Source Code Formatting
📄️ Style Aspects: High Level Issues
Self-contained Headers
📄️ Style Aspects: Low Level Issues
Naming Conventions
📄️ Recommendations
Function and Class Length
📄️ Self Generating Documentation
The srsRAN Project repository uses Doxygen to generate API documentation directly from the annotated C++ source files. In order to contribute to the API
📄️ Commit Formatting
When committing code to srsRAN Project codebase it is important that commit messages are clear and succinct. This means having clear guidelines for