[ https://issues.apache.org/jira/browse/HADOOP-12206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14618933#comment-14618933 ]
Hadoop QA commented on HADOOP-12206: ------------------------------------ \\ \\ | (/) *{color:green}+1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s {color} | {color:blue} precommit patch detected. {color} | | {color:blue}0{color} | {color:blue} @author {color} | {color:blue} 0m 0s {color} | {color:blue} Skipping @author checks as test-patch.sh has been patched. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 14s {color} | {color:green} Patch does not generate ASF License warnings. {color} | | {color:green}+1{color} | {color:green} shellcheck {color} | {color:green} 0m 9s {color} | {color:green} There were no new shellcheck issues. {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s {color} | {color:green} Patch has no whitespace issues. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 0m 26s {color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Patch URL | http://issues.apache.org/jira/secure/attachment/12744259/HADOOP-12206.HADOOP-12111.02.patch | | git revision | HADOOP-12111 / 8243608 | | Optional Tests | asflicense shellcheck | | uname | Linux asf901.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-HADOOP-Build/patchprocess/dev-support-test/personality/hadoop.sh | | Default Java | 1.7.0_55 | | Multi-JDK versions | /home/jenkins/tools/java/jdk1.8.0:1.8.0 /home/jenkins/tools/java/jdk1.7.0_55:1.7.0_55 | | shellcheck | v0.3.3 (This is an old version that has serious bugs. Consider upgrading.) | | Console output | https://builds.apache.org/job/PreCommit-HADOOP-Build/7199/console | This message was automatically generated. > The preceding invocations of findlargest in test-patch effect the following > invocation results > ---------------------------------------------------------------------------------------------- > > Key: HADOOP-12206 > URL: https://issues.apache.org/jira/browse/HADOOP-12206 > Project: Hadoop Common > Issue Type: Sub-task > Components: yetus > Reporter: Kengo Seki > Assignee: Kengo Seki > Labels: newbie > Attachments: HADOOP-12206.HADOOP-12111.01.patch, > HADOOP-12206.HADOOP-12111.02.patch > > > Because $maxlen is not defined as a local variable, the preceding invocations > effect the following results. > {code} > function findlargest > { > local column=$1 > shift > local a=("$@") > local sizeofa=${#a[@]} > local i=0 > until [[ ${i} -gt ${sizeofa} ]]; do > # shellcheck disable=SC2086 > string=$( echo ${a[$i]} | cut -f$((column + 1)) -d\| ) > if [[ ${#string} -gt $maxlen ]]; then > maxlen=${#string} > fi > i=$((i+1)) > done > echo "${maxlen}" > } > {code} > Also, {code}until [[ ${i} -gt ${sizeofa} ]]; do{code} should be -eq or -ge. -- This message was sent by Atlassian JIRA (v6.3.4#6332)