In SPDK, declarations have the return type on the same line. Definitions have the return type on a separate line. Astyle has an option for enforcing this. Unfortunately, it seems to have two bugs: 1) It doesn't work correctly at all on C++ files. 2) It often fails on functions that return enums, or long type names Deal with 1) by adjusting the check_format.sh script to only tell astyle to fix return type line breaks for C files and not C++. Deal with 2) by adding a few typedefs to work around the problem. Change-Id: Idf28281466cab8411ce252d5f02ab384166790c6 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13437 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> |
||
---|---|---|
.. | ||
json_util_ut.c | ||
Makefile |