scripts/check_format: check for spaces before tabs
Automatically detect more whitespace errors. All existing cases are fixed; only whitespace change (verify with diff -w) except for one comment style fixup in include/spdk/nvme.h. Change-Id: If750e54b9c8e3421ea6feda5f20184a31431631e Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/402360 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
a76da19f0c
commit
8a6ba58cb4
@ -1281,7 +1281,7 @@ int spdk_nvme_ns_cmd_read_with_md(struct spdk_nvme_ns *ns, struct spdk_nvme_qpai
|
||||
* \param type A bit field constructed from \ref enum spdk_nvme_dsm_attribute.
|
||||
* \param qpair I/O queue pair to submit the request
|
||||
* \param ranges An array of \ref spdk_nvme_dsm_range elements describing
|
||||
the LBAs to operate on.
|
||||
* the LBAs to operate on.
|
||||
* \param num_ranges The number of elements in the ranges array.
|
||||
* \param cb_fn callback function to invoke when the I/O is completed
|
||||
* \param cb_arg argument to pass to the callback function
|
||||
|
@ -51,6 +51,17 @@ else
|
||||
fi
|
||||
rm -f comment.log
|
||||
|
||||
echo -n "Checking for spaces before tabs..."
|
||||
git grep --line-number $' \t' -- > whitespace.log || true
|
||||
if [ -s whitespace.log ]; then
|
||||
echo " Spaces before tabs detected"
|
||||
cat whitespace.log
|
||||
rc=1
|
||||
else
|
||||
echo " OK"
|
||||
fi
|
||||
rm -f whitespace.log
|
||||
|
||||
echo -n "Checking trailing whitespace in output strings..."
|
||||
|
||||
git grep --line-number -e ' \\n"' -- '*.[ch]' > whitespace.log || true
|
||||
|
Loading…
Reference in New Issue
Block a user