hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Appy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14859) Better checkstyle reporting
Date Fri, 20 Nov 2015 22:51:11 GMT

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

Appy commented on HBASE-14859:

[~busbey] Looked at yetus's [checkstyle.sh|https://github.com/apache/yetus/blob/master/precommit/test-patch.d/checkstyle.sh].
It's not very smart. It's just printing out number of old and new errors which is what we
are doing currently.
Looking at [calcdiffs|https://github.com/apache/yetus/blob/37b482ed0ca28fbc47503fb972950c08d6ec96cb/precommit/test-patch.sh#L2063]
function, that is exactly what i was trying to do yesterday, but it doesn't work. The reason
is, when we add/remove code, line numbers of  existing errors change which changes the new
output. Simple diff will only work when there are 0 errors in trunk.

Attaching the patch I worked on last night. It creates a map from (filename, errorname) ->
count and checks if it changes pre and post patch. If it does, it prints filename, error and
old/new counts. It's not perfect, it won't catch a change which fixes existing error and introduces
new error of same type in same file. But it's much better than what we have now which only
looks at pre-patch/post-patch final counts and gives no hints where the new error was added.

It can't be tested using existing presubmit build, because it changes test-patch.sh itself.
So I tested it manually by changing code in few places, fixing/adding errors in different
scenarios, etc.

> Better checkstyle reporting
> ---------------------------
>                 Key: HBASE-14859
>                 URL: https://issues.apache.org/jira/browse/HBASE-14859
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Appy
>            Assignee: Appy
> With additional checkstyles in place, I believe "-1 checkstyle" will fire more often
now. Trying to make hunting down exact errors easier.

This message was sent by Atlassian JIRA

View raw message