From nobody Wed Feb 11 05:17:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1613136373; cv=none; d=zohomail.com; s=zohoarc; b=PYsAk+m2jgiRmYlsF2RxERqtPSTiFycuTQwtMRTp4kYn998nHn7kKrp4jrQNnV0CEdVFny09lDcGEtYR+DbfxgU4D9sT5BFB2OszMHJlG1+4QMZkMtj3gAFG3SejKDSexWz2cK/0F5lT2atBR+HOdl0HOJyGxZHlrXn/TVh4LsU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613136373; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XIAwwdGghApTBrytY3I8JvCzCSxAX2l8JTWCmcAxfCA=; b=L3tZ/ewMWI2CGrkuP5EMaYU4umlC9Ra3SLgrqALWb6a1hOlGE5eWjtPFa/atE2THC0WWmM6Ypzyt/+LBGJxIxWHXRPKxqB3G5ZvWO4KokXNtN6KQ1/R6Mt56iVVqmzgup5ToBNeS6OAzK6sltErf1osDhTMw6Di62oE2rJzyXd0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1613136373550742.7161755743058; Fri, 12 Feb 2021 05:26:13 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-283-jTtpcW99PBOtk8JWwG5Jeg-1; Fri, 12 Feb 2021 08:26:10 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D176C107ACF5; Fri, 12 Feb 2021 13:26:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A840B5D769; Fri, 12 Feb 2021 13:26:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6E70018095CD; Fri, 12 Feb 2021 13:26:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11CDPfRc008607 for ; Fri, 12 Feb 2021 08:25:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id B3489614EB; Fri, 12 Feb 2021 13:25:41 +0000 (UTC) Received: from work.redhat.com (ovpn-112-223.ams2.redhat.com [10.36.112.223]) by smtp.corp.redhat.com (Postfix) with ESMTP id 091C0648A8; Fri, 12 Feb 2021 13:25:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613136372; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=XIAwwdGghApTBrytY3I8JvCzCSxAX2l8JTWCmcAxfCA=; b=UlW+GvRpIpcD/Y04B0cLkF95LoAXkuEZKfmKSYDWvF9GNZHS6iUm/Y8QbGgf8tMG9rhnwU KH2LCI80ZlKyWLLO71WUwnYCY6JT9WiJ0E0fYqDizDC2d6lkkAYzNUzzesk2hyA4E3m2zg p9wW6nUAlzufKZn4PmqDPwBj6xpTJjg= X-MC-Unique: jTtpcW99PBOtk8JWwG5Jeg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 03/10] clang-tidy: Filter output Date: Fri, 12 Feb 2021 14:25:27 +0100 Message-Id: <20210212132534.29066-4-twiederh@redhat.com> In-Reply-To: <20210212132534.29066-1-twiederh@redhat.com> References: <20210212132534.29066-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" GitLab's CI output is capped at a certain size. Filter out all status messages that do not add value. Signed-off-by: Tim Wiederhake --- scripts/run-clang-tidy.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/scripts/run-clang-tidy.py b/scripts/run-clang-tidy.py index 79d9fb38b2..dc5880878b 100755 --- a/scripts/run-clang-tidy.py +++ b/scripts/run-clang-tidy.py @@ -5,11 +5,32 @@ import json import multiprocessing import os import queue +import re import subprocess import sys import threading =20 =20 +spam =3D [ + re.compile("^[0-9]+ (warning|error)[s]? .*generated"), + re.compile("^[0-9]+ warning[s]? treated as error"), + re.compile("^Suppressed [0-9]+ warning[s]?"), + re.compile("^Use .* to display errors from all non-system headers"), + re.compile("Error while processing "), + re.compile("Found compiler error"), +] + + +def remove_spam(output): + retval =3D list() + for line in output.split("\n"): + if any([s.match(line) for s in spam]): + continue + retval.append(line) + + return "\n".join(retval) + + def parse_args(): parser =3D argparse.ArgumentParser(description=3D"caching clang-tidy r= unner") parser.add_argument( @@ -41,8 +62,8 @@ def run_clang_tidy(item): universal_newlines=3DTrue) return { "returncode": result.returncode, - "stdout": result.stdout.strip(), - "stderr": result.stderr.strip(), + "stdout": remove_spam(result.stdout.strip()), + "stderr": remove_spam(result.stderr.strip()), } =20 =20 --=20 2.26.2