-
Notifications
You must be signed in to change notification settings - Fork 43
Description
There are two major problems with this project's header style, that should be addressed:
Header file extensions
Most embedded projects use a mix of C and C++ language code. In this environment it is very misleading to use .h for C++ headers that the C compiler cannot compile. Having a clear separation (using .h for C and .hpp for C++ headers) makes detecting wrong includes immediately visible and easy to troubleshoot.
Furthermore, the generated header files should also adopt this, preferably with .pb.hpp extension, as the .pb is a canonical semi-extension that commonly refers to protobuf generated output.
Header file scope
Having very generic header names such as Defines.h, Errors.h gives a high chance of header name collision with the application it is integrated into. The headers should either be prefixed with the project name, or moved into a subdirectory and included with the directory name, e.g. #include "EmbeddedProto_Defines.hpp" or #include "EmbeddedProto/Defines.hpp".