littlefs-project / littlefs

A little fail-safe filesystem designed for microcontrollers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The internal code of littlefs needs better documentation

andriyndev opened this issue · comments

Currently, the internal part of the code of littlefs is poorly documented. At the same time, it's very complex to understand just by analyzing the code. Reading DESIGN.md and SPEC.md partially helps but it's not enough to understand a significant part of the code responsible for internal functionality. This may significantly discourage potential contributors since they'll struggle to understand the code by themself without additional help. The documentation is needed for:

  • Internal structs (including each member), data types, enums, macros.
  • Internal functions, their parameters and return value. It should provide a good description what the function does and what each parameter means/intended for.
  • Some blocks of code which might be difficult to understand.
    The documentation can be avoided when it's already quite clear what the corresponding entity is intended for.
    P.S. It's my point of view. Some people might say that I cannot understand the code because I'm a bad developer. Maybe it's true to some extent but, from what I remember, it's one of the most difficult code I encountered so far, and some parts of it even look like some kind of black magic for me:)