Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9D6BA18CBB for ; Fri, 20 Nov 2015 22:51:11 +0000 (UTC) Received: (qmail 96830 invoked by uid 500); 20 Nov 2015 22:51:11 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 96756 invoked by uid 500); 20 Nov 2015 22:51:11 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 96653 invoked by uid 99); 20 Nov 2015 22:51:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2015 22:51:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2822D2C1F6F for ; Fri, 20 Nov 2015 22:51:11 +0000 (UTC) Date: Fri, 20 Nov 2015 22:51:11 +0000 (UTC) From: "Appy (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-14859) Better checkstyle reporting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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 (v6.3.4#6332)