HBASE-19249 test for "hbase antipatterns" should check _count_ of occurance rather than text of
Signed-off-by: Apekshit Sharma <appy@apache.org>
This commit is contained in:
parent
9ed6cf5cb8
commit
7406c83ef6
|
@ -431,21 +431,21 @@ function hbaseanti_patchfile
|
|||
|
||||
start_clock
|
||||
|
||||
warnings=$(${GREP} 'new TreeMap<byte.*()' "${patchfile}")
|
||||
warnings=$(${GREP} -c 'new TreeMap<byte.*()' "${patchfile}")
|
||||
if [[ ${warnings} -gt 0 ]]; then
|
||||
add_vote_table -1 hbaseanti "" "The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted: ${warnings}."
|
||||
add_vote_table -1 hbaseanti "" "The patch appears to have anti-pattern where BYTES_COMPARATOR was omitted."
|
||||
((result=result+1))
|
||||
fi
|
||||
|
||||
warnings=$(${GREP} 'import org.apache.hadoop.classification' "${patchfile}")
|
||||
warnings=$(${GREP} -c 'import org.apache.hadoop.classification' "${patchfile}")
|
||||
if [[ ${warnings} -gt 0 ]]; then
|
||||
add_vote_table -1 hbaseanti "" "The patch appears use Hadoop classification instead of HBase: ${warnings}."
|
||||
add_vote_table -1 hbaseanti "" "The patch appears use Hadoop classification instead of HBase."
|
||||
((result=result+1))
|
||||
fi
|
||||
|
||||
warnings=$(${GREP} 'import org.codehaus.jackson' "${patchfile}")
|
||||
warnings=$(${GREP} -c 'import org.codehaus.jackson' "${patchfile}")
|
||||
if [[ ${warnings} -gt 0 ]]; then
|
||||
add_vote_table -1 hbaseanti "" "The patch appears use Jackson 1 classes/annotations: ${warnings}."
|
||||
add_vote_table -1 hbaseanti "" "The patch appears use Jackson 1 classes/annotations."
|
||||
((result=result+1))
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue