Requirements for contributing Source Code¶
- Make sure it follows the package, repo, and codebase rules
- Make sure it builds
- Write a unit test for it. Test positive cases as well as negative cases.
- Make sure it has docs. Even a minimal readme.md will get collected and added to the docs.
- Make sure it has only valid characters encoded (often copy paste from Microsoft Word docs or the internet will lead to invalid characters)
- If it is a small change/tweak to existing code that originates outside of Project Mu please mark it with //MU_CHANGE
- All new modules must be listed in their containing package DSC in the components section
- All modules must follow the dependency rules of their containing package
- All modules within common layers should avoid silicon or architecture dependencies.
- Use existing libraries and functionality when possible
- Build out minimal required abstraction to allow other silicon or architectures to leverage common capabilities
Public Header files¶
- Don't include other header files
- Don't mix public and private information in the same header file
- Implementation details should be contained to the instance
- Use "doxygen" style function header comments to clearly specify parameters and return results.
- Use a guidgen tool to define any guids
- For libraries:
- Library class should be listed in Package DEC file
- A NULL instance must be created that allows compiling and linking with minimal dependencies.
- The supported module types in the INFs must be accurate.
LIBRARY_CLASS: <Library Class Name>|<Module types supported by this instance>
- Use STATIC on each non-public function and non-public global to avoid conflicts with other modules.
- Use EFIAPI on all public library class functions.
For general Edk2 and UEFI development additional information can be found at the TianoCore.org website.