From patchwork Tue Oct 11 10:47:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrill Tkachov X-Patchwork-Id: 680686 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3stYc062wSz9s5w for ; Tue, 11 Oct 2016 21:47:44 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=y5HPd8KP; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=QaTxMS4l45fUOObKTVTaKVgvViJRkrPBBUl2ZiPcXE/KTY SeknQOz+W2DDZEasHKzA3EFGqX++11c7BplOPD2u8pdQqglittFOoMg0qZHxZ1/f +c+2k1GNI6ewNueU97RGk98+VttOjwyt2YQvppsv3OH+CoD5RoEoMy4b9zdyY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=nQXIK7ZMuNRPf1cUcodp4XLHaYI=; b=y5HPd8KP2rcoJFCFffog zb5g0dLZrnMw7fylYwT9k88DH6ZUPxeu2bGbammPsh2Kf+34eh+baHRM4mc2lPzv 7RnQIvWKdH1jasbceOoUF2YoJlrTtJLayPCb0fR5+X+ZaamYRICResDRAH7hfU8l X2OWFwvJV8nBea94IWOox/c= Received: (qmail 114546 invoked by alias); 11 Oct 2016 10:47:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 114536 invoked by uid 89); 11 Oct 2016 10:47:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=complains, complaints, Hx-languages-length:1488, lengths X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Oct 2016 10:47:25 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 89B0328 for ; Tue, 11 Oct 2016 03:47:23 -0700 (PDT) Received: from [10.2.207.77] (e100706-lin.cambridge.arm.com [10.2.207.77]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C88BA3F251 for ; Tue, 11 Oct 2016 03:47:22 -0700 (PDT) Message-ID: <57FCC339.3040902@foss.arm.com> Date: Tue, 11 Oct 2016 11:47:21 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH][check_GNU_style.sh] More aggressively ignore dg-xxx directives Hi all, check_GNU_style.sh complains a lot about dg-* directives in the testsuite and in particular about line lengths. There's nothing we can do about the directives and sometimes they're supposed to be long, in particular the scan-assembler checks in dg-final. Currently check_GNU_style.sh has code to avoid warning for dg-* directives but it's too weak, it doesn't catch dg-final or dg-options directives. This patch makes the code ignore all "{ dg-.*" lines for length purposes. This eliminates a lot of false positives in my patches and didn't filter any legitimate warnings in my patches. Ok for trunk? Thanks, Kyrill 2016-10-11 Kyrylo Tkachov * check_GNU_style.sh (col): Ignore dg-XXX directives for line length complaints. commit d0685da3487fc4cc614c64851185fed5c350bb7b Author: Kyrylo Tkachov Date: Tue Oct 11 11:33:50 2016 +0100 [check_GNU_style.sh] More aggressively ignore dg-xxx directives diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh index 87a276c..ed4e07f 100755 --- a/contrib/check_GNU_style.sh +++ b/contrib/check_GNU_style.sh @@ -178,7 +178,7 @@ col (){ cat "$tmp" \ | sed 's/^[0-9]*:+//' \ | expand \ - | awk '$0 !~ /{[[:space:]]*dg-(error|warning|message)[[:space:]]/ { \ + | awk '$0 !~ /{[[:space:]]*dg-[^[:space:]]+[[:space:]]/ { \ if (length($0) > 80) \ printf "%s\033[1;31m%s\033[0m\n", \ substr($0,1,80), \