rfc.sh: make alignment check compulsory
Earlier, it was not reported if a function call had arguments on next line and the args were not aligned to opening bracket. With this change, it is a check that is displayed in output. I have not analyzed what all --strict brings in. If it is found to be more restrictive than required, we may choose to promote this *one* CHK to WARN and stop using --strict. Sample: CHECK: Alignment should match open parenthesis + ret = gf_asprintf (&footer, + " [%s]", strerror(errnum)); total: 0 warnings, 1 checks, 8 lines checked Change-Id: I48834087efcae872b69746ba962b0bb1c130b5cd BUG: 1469179 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: https://review.gluster.org/17737 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: ankitraj Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Reviewed-by: Sonal Arora <sarora@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
d26f0bac14
commit
43d55c5afb
8
rfc.sh
8
rfc.sh
@ -180,17 +180,17 @@ check_patches_for_coding_style()
|
|||||||
# Kludge: "1>&2 && echo $? || echo $?" is to get around
|
# Kludge: "1>&2 && echo $? || echo $?" is to get around
|
||||||
# "-e" from script invocation
|
# "-e" from script invocation
|
||||||
RES=$(git format-patch --stdout origin/${branch}..${head} \
|
RES=$(git format-patch --stdout origin/${branch}..${head} \
|
||||||
| ${check_patch_script} --terse - 1>&2 && echo $? || echo $?)
|
| ${check_patch_script} --strict --terse - 1>&2 && echo $? || echo $?)
|
||||||
if [ "$RES" -eq 1 ] ; then
|
if [ "$RES" -eq 1 ] ; then
|
||||||
echo "Errors caught, get details by:"
|
echo "Errors caught, get details by:"
|
||||||
echo " git format-patch --stdout origin/${branch}..${head} \\"
|
echo " git format-patch --stdout origin/${branch}..${head} \\"
|
||||||
echo " | ${check_patch_script} --gerrit-url ${GERRIT_URL} -"
|
echo " | ${check_patch_script} --strict --gerrit-url ${GERRIT_URL} -"
|
||||||
echo "and correct errors"
|
echo "and correct errors"
|
||||||
exit 1
|
exit 1
|
||||||
elif [ "$RES" -eq 2 ] ; then
|
elif [ "$RES" -eq 2 ] ; then
|
||||||
echo "Warnings caught, get details by:"
|
echo "Warnings or checks caught, get details by:"
|
||||||
echo " git format-patch --stdout origin/${branch}..${head} \\"
|
echo " git format-patch --stdout origin/${branch}..${head} \\"
|
||||||
echo " | ${check_patch_script} --gerrit-url ${GERRIT_URL} -"
|
echo " | ${check_patch_script} --strict --gerrit-url ${GERRIT_URL} -"
|
||||||
echo -n "Do you want to continue anyway [no/yes]: "
|
echo -n "Do you want to continue anyway [no/yes]: "
|
||||||
read yesno
|
read yesno
|
||||||
if [ "${yesno}" != "yes" ] ; then
|
if [ "${yesno}" != "yes" ] ; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user