scripts: Add check_format test for JSON-RPC documentation
All JSON-RPCs must be documented in jsonrpc.md Change-Id: Iec9119a01433fd0cbe4df4477ce94cc2feeb0d54 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4074 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: <dongx.yi@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Monica Kenguva <monica.kenguva@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
d80267cc17
commit
03a3a5c02d
@ -567,6 +567,19 @@ function check_changelog() {
|
|||||||
return $rc
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function check_json_rpc() {
|
||||||
|
local rc=0
|
||||||
|
|
||||||
|
while IFS='"' read -r _ rpc _; do
|
||||||
|
if ! grep -q "^## $rpc" doc/jsonrpc.md; then
|
||||||
|
echo "Missing JSON-RPC documentation for ${rpc}"
|
||||||
|
rc=1
|
||||||
|
fi
|
||||||
|
done < <(git grep -h "^SPDK_RPC_REGISTER(" ':!test/*')
|
||||||
|
|
||||||
|
return $rc
|
||||||
|
}
|
||||||
|
|
||||||
rc=0
|
rc=0
|
||||||
|
|
||||||
check_permissions || rc=1
|
check_permissions || rc=1
|
||||||
@ -593,5 +606,6 @@ check_python_style || rc=1
|
|||||||
check_bash_style || rc=1
|
check_bash_style || rc=1
|
||||||
check_bash_static_analysis || rc=1
|
check_bash_static_analysis || rc=1
|
||||||
check_changelog || rc=1
|
check_changelog || rc=1
|
||||||
|
check_json_rpc || rc=1
|
||||||
|
|
||||||
exit $rc
|
exit $rc
|
||||||
|
Loading…
Reference in New Issue
Block a user