[ 
https://issues.apache.org/jira/browse/HBASE-20478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16449942#comment-16449942
 ] 

Mike Drob commented on HBASE-20478:
-----------------------------------

why are we calling start_clock 4 times now?


would it make sense to not run each grep twice?
{code}
   warnings=$(${GREP} 'new TreeMap<byte.*()' "${patchfile}")
   if [[ -n ${warnings} ]]; then
     add_vote_table -1 hbaseanti "" "The patch appears to have anti-pattern 
where BYTES_COMPARATOR was omitted."
    echo "Use of TreeMap without BYTES_COMPARATOR in patch"
    echo "Use of TreeMap without BYTES_COMPARATOR in patch\n------" 
>>"${PATCH_DIR}/${logfile}"
    echo $warnings >>"${PATCH_DIR}/${logfile}"
    echo "-------" >>"${PATCH_DIR}/${logfile}"
    ((result=result+1))
   fi
{code}


> precommit check for "hbase antipatterns" should log details and add a footer 
> as needed
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-20478
>                 URL: https://issues.apache.org/jira/browse/HBASE-20478
>             Project: HBase
>          Issue Type: Improvement
>          Components: test
>            Reporter: Sean Busbey
>            Assignee: Sean Busbey
>            Priority: Major
>         Attachments: HBASE-20478.0.patch, HBASE-20478.1.patch, 
> HBASE-20478.WIP.patch
>
>
> came up in discussion on HBASE-20332. our check of "don't do this" things in 
> the codebase doesn't log the specifics of complaints anywhere, which forces 
> those who want to follow up to reverse engineer the check.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to