From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by sourceware.org (Postfix) with ESMTPS id 686453857809 for ; Wed, 19 Jan 2022 14:04:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 686453857809 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=seketeli.org Received: (Authenticated sender: dodji@seketeli.org) by mail.gandi.net (Postfix) with ESMTPSA id EC1701BF20A; Wed, 19 Jan 2022 14:04:34 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id E66ED581891; Wed, 19 Jan 2022 15:04:33 +0100 (CET) From: Dodji Seketeli To: Matthias Maennich Cc: libabigail@sourceware.org, gprocida@google.com, kernel-team@android.com Subject: Re: [PATCH] abidiff: improve whitespace generation in symbol diff report Organization: Me, myself and I References: <20211126110642.4164044-1-maennich@google.com> X-Operating-System: Fedora 36 X-URL: http://www.seketeli.net/~dodji Date: Wed, 19 Jan 2022 15:04:33 +0100 In-Reply-To: <20211126110642.4164044-1-maennich@google.com> (Matthias Maennich's message of "Fri, 26 Nov 2021 11:06:42 +0000") Message-ID: <87fspjbz4e.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2022 14:04:39 -0000 Matthias Maennich a =C3=A9crit: > maybe_report_diff_for_symbol() has a few issues: > > 1. The responsibility for newline emission is somewhat unclear and > indeed it would emit spurious blank lines before most of the > sub-diffs it reports. > > 2. Different sub-diff text and terminal commas are emitted according to > whether or not there had been a previous sub-diff - making the output > harder to grep and post-process. > > 3. The function also returns a bool but that return value is never used. > > Hence, change the function to return void, the function stanzas to > always emit newline-terminated lines and ensure the wording and > punctuation of each sub-diff do not vary. This also tweaks (shortens) > the wording used for CRC diffs. > > * src/abg-reporter-priv.cc (maybe_report_diff_for_symbol): > Make return void. Simplify and fix new-line emission. Remove > comma emission. Tweak CRC wording. > * src/abg-reporter-priv.h (maybe_report_diff_for_symbol): > Return void. > * tests/data/test-abidiff-exit/test-crc-report.txt: Shorten CRC > wording. > * tests/data/test-abidiff/test-crc-report.txt: Likewise. > * tests/data/test-diff-filter/test-PR27569-report-0.txt: > Likewise. > > Reviewed-by: Giuliano Procida > Signed-off-by: Matthias Maennich Applied to master, thanks! [...] Cheers, --=20 Dodji