EDK II Code Formatting

  • Install the Uncrustify VS Code extension: Search Uncrustify in VS Code Marketplace and Install it

Uncrustify

"uncrustify.configPath.windows": "C:/Uncrustify/uncrustify.cfg",
"uncrustify.executablePath.windows": "C:/Uncrustify/uncrustify.exe"
  • Open a C source code file, Ctrl+Shift+P -> Format Document With… -> Configure Default Formatter -> Uncrustify

  • Then, Ctrl+Shift+P -> Format Document any time you would like to format your source code file with Uncrustify

Reference

EDK II Code Formatting · tianocore/tianocore.github.io Wiki