X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Ffunction%2Fcommon.sh;fp=resources%2Flibraries%2Fbash%2Ffunction%2Fcommon.sh;h=70ce91c0b7ec966e65c8bb2cd4f1042c6dc175dc;hp=f724e53ea0eaa0990914e56d5a6b41dda1ea06d1;hb=d867f81c2f6c7fefecd52276ecc4deb330a01cbc;hpb=57b2c338b8295884a4fa9405b66c42e726b8b7d3 diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index f724e53ea0..70ce91c0b7 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -911,6 +911,13 @@ function select_tags () { warn "The following tag expression hints at bad trigger: ${tag}" warn "Possible cause: Multiple triggers in a single comment." die "Aborting to avoid triggering too many tests." + elif [[ "${tag}" == *"OR"* ]]; then + # If OR had higher precedence than AND, it would be useful here. + # Some people think it does, thus triggering way too much tests. + set -x + warn "The following tag expression hints at bad trigger: ${tag}" + warn "Operator OR has lower precedence than AND. Use space instead." + die "Aborting to avoid triggering too many tests." elif [[ "${tag}" != "" && "${tag}" != "#"* ]]; then # Empty and comment lines are skipped. # Other lines are normal tags, they are to be prefixed.