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

Peter Vary commented on HIVE-15051:
-----------------------------------

The current status:
I am trying my hands on [Apache Yetus 
0.3.0|https://yetus.apache.org/documentation/0.3.0/].
What I like about it:
- Several existing tests (asflicense, author, checkstyle, findbugs, javac, 
javadoc, test4tests, unitveto, whitespace, xml, junit)
- It shows changes in errors so we do not have to clean up the code, but new 
code will be checked.
- Used by multiple ASF projects already - so we will be Apache conform using it.
- Extensible, so if we decide to add the ptest framework to these test this 
could be done

Created a hive personality and was able to enable most of the plugins.
- Asflicense - apache-rat:check - this works flawlessly
- Author - Checks for @author tags - this works flawlessly
- Checkstyle - There is an existing checkstyle.xml in hive, but this could not 
be run on a single module only from the root. If I remove the header check from 
it, then the single module run is possible. After this change the test could be 
enabled. The current checkstyle configuration needs some serious be improvement.
- Findbugs - Needs the findbugs binary installed, and yetus currently restricts 
checks for standard maven layouts (/src/main/java, /src/test/java) - We use 
this source layout only in itest modules. This test run could take more time. 
Need some trivial changes in yetus.
- Javac - I have enabled it for now but there might be a better solution for 
it. It counts the error/warning messages in the mvn install output, so 
compilation warnings can be highlighted
- Javadoc - Could be enabled easily. Currently there are errors in javadocs, 
where extra params or exceptions left after the method signature is changed. 
This prevents the calculation for these modules, but I think these errors could 
be cleaned up by a script.
- Test4tests - Should create or own to handle query files as tests - I created 
one which +1 a patch only if at least one unit or query test is added or changed
- Unitveto - Could be enabled easily, but I do not think we want to veto 
changes in specific files at the moment
- Whitespace - Counts the tabs, and the whitespaces at the end of the lines - 
this works flawlessly
- Xml - Checks the formatting of the xml-s - this works flawlessly
- JUnit - I think we do not want to use this - we would like to use ptest 
instead



> Test framework integration with findbugs, rat checks etc.
> ---------------------------------------------------------
>
>                 Key: HIVE-15051
>                 URL: https://issues.apache.org/jira/browse/HIVE-15051
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Testing Infrastructure
>            Reporter: Peter Vary
>            Assignee: Peter Vary
>
> Find a way to integrate code analysis tools like findbugs, rat checks to 
> PreCommit tests, thus removing the burden from reviewers to check the code 
> style and other checks which could be done by code. 
> Might worth to take a look on Yetus, but keep in mind the Hive has a specific 
> parallel test framework.



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

Reply via email to