📚 Table of Contents
While working on C++ projects—mainly using PlatformIO and ESP32/ESP8266/Arduino—I always aim to maintain a consistent and high-quality coding style. This ensures not only functional code, but also consistent comment styles in function headers and footers.
However, after editing multiple files and debugging complex code, this structure often becomes inconsistent or lost altogether.
To address this, I began creating a tool that searches for uncommented functions or functions with non-standard documentation. After several iterations, the parser's output became satisfying.
That's when the idea was born: “Why not auto-generate function header comments?”
And so, the CppCodeDoc project came to life. The tool now enables automatic detection and insertion of header/footer comments, and generates professional-looking documentation as .html or .md. The report highlights open TODOs and provides a clear overview of documentation progress.
- Automatic Commenting in .cpp, .h, .hpp, .ino and .cxx files If no header or footer comment is found, the software can automatically insert one—either in default or Doxygen style.
- Footer comment example
//FunctionBevore;
} /* "functionName()" */ - Default Header Comment
/*------------------------------------------------------
* functionName() ToDo
--------------------------------------------------------*/
int functionName(){
// blabla
}- Doxygen Header Comment
/**------------------------------------------------------
* @brief functionName() ToDo
* @param foo TODO
* @return TODO
--------------------------------------------------------*/
int functionName(int foo){
// blabla
}- Single-line comment conversion example
From:
// Hi I am a singleLine comment
void functionName(int foo){
// blabla
}To:
/*------------------------------------------------------
* Hi I am a singleLine comment
--------------------------------------------------------*/
void functionName(int foo) {
// blabla
}-
Auto Documentation Generation
- Output formats:
.mdor.html - Highlights TODOs in comments
- Calculates documentation completion percentage
- Output formats:
-
Optional Backup Before Edit
-
Various Project-Based-Configuration possibilitys
-
Update Checker
You have several options to use the application:
- Run with Python (recommended for developers): First, install requirements. Then launch via terminal:
python .\CppCodeDoc.py-
Use the installer (simplest setup) Download the latest .exe, call it with administrator privilegs and follow the setup wizard. Python is not required.
-
Use the CLI (advanced) For command-line usage without the GUI, run:
python .\CppCodeDoc.py --NoGuiRegardless of the method you choose, the repository must be cloned locally first:
git clone https://github.com/JoJos1220/CppCodeDoc.git
cd CppCodeDoc*) For command-line usage, make sure Python is installed.
*) When using the installer, Python is not required — all necessary packages are bundled with the installer. Ensure running the installer with admin privilegs.
-
Support for more output formats
Currently, only.mdand.htmlare supported. PDF export is planned. -
Live Preview of Settings in GUI
When adjusting settings that affect documentation appearance, the GUI should immediately show a live preview. -
Class-based Grouping of Functions
Functions will be grouped by class in the report, improving clarity. -
Add File Header/Footer
Automatic insertion of license headers/footers per file will be implemented. -
Feature Requests Welcome
Have a great idea? Don’t hesitate to ask!
Everybody is welcome to contribute the project - regardless of the experience level!
- fork the repository
- clone your fork on your PC
- create a branch for your changes 4a) add you changes 4b) make a test-case to ensure the design meets your specification 4c) make and test the software-installer by calling .\scripts\Convert_PyToExe.py script
- commit and push
- create a pull request
- after the pull request is successfull, new release will be created by .\scripts\CreateTagRelease.py script.
See also LICENSE for more information about license rights and limitations about this project.
You can reach me out directly on Github
You Like the Project and want to Support me and my work?
Well, I like coffee ;) Maybe we got a deal?


