[jira] [Commented] (HADOOP-11745) Incorporate ShellCheck static analysis into Jenkins pre-commit builds.

2015-05-07 Thread Allen Wittenauer (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-11745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14533749#comment-14533749
 ] 

Allen Wittenauer commented on HADOOP-11745:
---

Linking the BUILDS-77 jira I filed.

This is a little disconcerting.  Looking more and more like HADOOP-11933 will 
get finished first, then we can stop making requests like this one.

 Incorporate ShellCheck static analysis into Jenkins pre-commit builds.
 --

 Key: HADOOP-11745
 URL: https://issues.apache.org/jira/browse/HADOOP-11745
 Project: Hadoop Common
  Issue Type: Improvement
  Components: build, scripts
Reporter: Chris Nauroth
Assignee: Allen Wittenauer
Priority: Minor

 During the shell script rewrite on trunk, we've been using ShellCheck as a 
 static analysis tool to catch common errors.  We can incorporate this 
 directly into Jenkins pre-commit builds.  Jenkins can reply with a -1 on 
 shell script patches that introduce new ShellCheck warnings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-11745) Incorporate ShellCheck static analysis into Jenkins pre-commit builds.

2015-04-21 Thread Allen Wittenauer (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-11745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14505506#comment-14505506
 ] 

Allen Wittenauer commented on HADOOP-11745:
---

Even though HADOOP-11746 has the fix, someone needs to follow up and get 
shellcheck actually installed on the Jenkins nodes.

 Incorporate ShellCheck static analysis into Jenkins pre-commit builds.
 --

 Key: HADOOP-11745
 URL: https://issues.apache.org/jira/browse/HADOOP-11745
 Project: Hadoop Common
  Issue Type: Improvement
  Components: build, scripts
Reporter: Chris Nauroth
Assignee: Allen Wittenauer
Priority: Minor

 During the shell script rewrite on trunk, we've been using ShellCheck as a 
 static analysis tool to catch common errors.  We can incorporate this 
 directly into Jenkins pre-commit builds.  Jenkins can reply with a -1 on 
 shell script patches that introduce new ShellCheck warnings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-11745) Incorporate ShellCheck static analysis into Jenkins pre-commit builds.

2015-03-28 Thread Allen Wittenauer (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-11745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14385628#comment-14385628
 ] 

Allen Wittenauer commented on HADOOP-11745:
---

I've got some rudimentary shellcheck support in HADOOP-11746 .

 Incorporate ShellCheck static analysis into Jenkins pre-commit builds.
 --

 Key: HADOOP-11745
 URL: https://issues.apache.org/jira/browse/HADOOP-11745
 Project: Hadoop Common
  Issue Type: Improvement
  Components: build, scripts
Reporter: Chris Nauroth
Priority: Minor

 During the shell script rewrite on trunk, we've been using ShellCheck as a 
 static analysis tool to catch common errors.  We can incorporate this 
 directly into Jenkins pre-commit builds.  Jenkins can reply with a -1 on 
 shell script patches that introduce new ShellCheck warnings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-11745) Incorporate shellcheck static analysis into Jenkins pre-commit builds.

2015-03-24 Thread Chris Nauroth (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-11745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14378767#comment-14378767
 ] 

Chris Nauroth commented on HADOOP-11745:


Here is information on ShellCheck:

http://www.shellcheck.net/about.html

We'd need to arrange for this to be deployed to all of the Jenkins hosts and 
then modify test-patch.sh to call it.

cc [~aw]

 Incorporate shellcheck static analysis into Jenkins pre-commit builds.
 --

 Key: HADOOP-11745
 URL: https://issues.apache.org/jira/browse/HADOOP-11745
 Project: Hadoop Common
  Issue Type: Improvement
  Components: build, scripts
Reporter: Chris Nauroth
Priority: Minor

 During the shell script rewrite on trunk, we've been using ShellCheck as a 
 static analysis tool to catch common errors.  We can incorporate this 
 directly into Jenkins pre-commit builds.  Jenkins can reply with a -1 on 
 shell script patches that introduce new ShellCheck warnings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-11745) Incorporate ShellCheck static analysis into Jenkins pre-commit builds.

2015-03-24 Thread Allen Wittenauer (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-11745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14378933#comment-14378933
 ] 

Allen Wittenauer commented on HADOOP-11745:
---

Ha! I've been thinking more and more about HADOOP-10854 and what kind of things 
should be done for it.  This particular issue (shellcheck part of test-patch) 
was going to be something of immediate priority on that list!

So I'm glad to see this here. :D

One of the things that I've been puzzling over was the best way to mark thing 
that we know are unfixable (HADOOP_OPTS handling in hadoop-functions.sh, for 
example).  I've been meaning to look at how exceptions are handled for some of 
the Java-bits but I hadn't gotten that far yet.

One of the big gotchas with putting this into the pipeline is we need to audit 
*ALL* of the shell scripts to make sure they pass.  At this point, I think/hope 
the only things left to really look at is dev-support itself.  

 Incorporate ShellCheck static analysis into Jenkins pre-commit builds.
 --

 Key: HADOOP-11745
 URL: https://issues.apache.org/jira/browse/HADOOP-11745
 Project: Hadoop Common
  Issue Type: Improvement
  Components: build, scripts
Reporter: Chris Nauroth
Priority: Minor

 During the shell script rewrite on trunk, we've been using ShellCheck as a 
 static analysis tool to catch common errors.  We can incorporate this 
 directly into Jenkins pre-commit builds.  Jenkins can reply with a -1 on 
 shell script patches that introduce new ShellCheck warnings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-11745) Incorporate ShellCheck static analysis into Jenkins pre-commit builds.

2015-03-24 Thread Chris Nauroth (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-11745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14378985#comment-14378985
 ] 

Chris Nauroth commented on HADOOP-11745:


bq. I've been meaning to look at how exceptions are handled for some of the 
Java-bits but I hadn't gotten that far yet.

I think the closest analogy in the Java world is our Findbugs exclude files.  
These are XML files that describe points in the code that trigger Findbugs 
warnings that we have agreed are spurious.  I think the {{shellcheck disable}} 
comments are similar.  I think if we keep using that, then it would work out 
fine.

bq. At this point, I think/hope the only things left to really look at is 
dev-support itself.

Yes, that's a good point.  I do see a lot of warnings in the dev-support 
scripts.  If this gets intractable, then I suppose as a first step we could 
chicken out and filter dev-support from the ShellCheck results.  :-)

 Incorporate ShellCheck static analysis into Jenkins pre-commit builds.
 --

 Key: HADOOP-11745
 URL: https://issues.apache.org/jira/browse/HADOOP-11745
 Project: Hadoop Common
  Issue Type: Improvement
  Components: build, scripts
Reporter: Chris Nauroth
Priority: Minor

 During the shell script rewrite on trunk, we've been using ShellCheck as a 
 static analysis tool to catch common errors.  We can incorporate this 
 directly into Jenkins pre-commit builds.  Jenkins can reply with a -1 on 
 shell script patches that introduce new ShellCheck warnings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-11745) Incorporate ShellCheck static analysis into Jenkins pre-commit builds.

2015-03-24 Thread Allen Wittenauer (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-11745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14379230#comment-14379230
 ] 

Allen Wittenauer commented on HADOOP-11745:
---

I've opened HADOOP-11746 to take on test-patch.sh.  For now, we should plan on 
escaping out dev-support, but this code is *terrible*.

 Incorporate ShellCheck static analysis into Jenkins pre-commit builds.
 --

 Key: HADOOP-11745
 URL: https://issues.apache.org/jira/browse/HADOOP-11745
 Project: Hadoop Common
  Issue Type: Improvement
  Components: build, scripts
Reporter: Chris Nauroth
Priority: Minor

 During the shell script rewrite on trunk, we've been using ShellCheck as a 
 static analysis tool to catch common errors.  We can incorporate this 
 directly into Jenkins pre-commit builds.  Jenkins can reply with a -1 on 
 shell script patches that introduce new ShellCheck warnings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-11745) Incorporate ShellCheck static analysis into Jenkins pre-commit builds.

2015-03-24 Thread Allen Wittenauer (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-11745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14379046#comment-14379046
 ] 

Allen Wittenauer commented on HADOOP-11745:
---

Looking at this now, shellcheck does support spitting out something that is 
checkstyle-compatible, but I'm not sure how to integrate that into our build 
setup.

 Someone asked me the other day if I was going to fix dev-support too since 
technically it is mostly shell code. I guess I'll probably take a look at the 
dev-support/ stuff and start whacking at it. 

 Incorporate ShellCheck static analysis into Jenkins pre-commit builds.
 --

 Key: HADOOP-11745
 URL: https://issues.apache.org/jira/browse/HADOOP-11745
 Project: Hadoop Common
  Issue Type: Improvement
  Components: build, scripts
Reporter: Chris Nauroth
Priority: Minor

 During the shell script rewrite on trunk, we've been using ShellCheck as a 
 static analysis tool to catch common errors.  We can incorporate this 
 directly into Jenkins pre-commit builds.  Jenkins can reply with a -1 on 
 shell script patches that introduce new ShellCheck warnings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)