Source Code Documentation HowTo

Auto-Generated Documentation


Table of Contents

1. YCP Module and Client Documentation
1.1. Documentation-Generation Tool
1.2. YCP File Header
1.3. YCP Functions
1.4. YCP Variables
2. Perl Module Documentation
3. SCR Agent Documentation

A lot of YaST documentation is generated from the source code. That's the reason why we should follow some rules when documenting the source code (especially functions and variables) to have the possibility of auto-generated documentation.

Why should we have it? It's not needed to create your own modules, functions or agents when such things alread exist. You can just use something that already exist. But the most important information is that it exists, where it exists and how to use it. All these pieces of information can be in the auto-generated documentation.

Additionally, if you develop some universal module with, e.g., functionality offering abstraction layer for reading and writing records from and into the OpenLDAP server, you should document the functionality itself to offer it to others.