public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Giuliano Procida <gprocida@google.com>
To: libabigail@sourceware.org
Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com,
	 maennich@google.com
Subject: [PATCH 6/7] abidiff: Eliminate leaf mode double blank lines.
Date: Fri, 27 Mar 2020 14:00:16 +0000	[thread overview]
Message-ID: <20200327140017.1917-7-gprocida@google.com> (raw)
In-Reply-To: <20200327140017.1917-1-gprocida@google.com>

In --leaf-changes-only mode, the report currently has 2 blank lines
after each type-diff section. This patches changes this to 1.

	* src/abg-leaf-reporter.cc: (report_diffs) Emit 1 instead of 2
	new lines between sections.
	* tests/data/test-abidiff-exit/test-leaf-peeling-report.txt:
	Replace double blank lines with single ones.
	* tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt:
	Ditto.
	* tests/data/test-diff-suppr/test36-leaf-report-0.txt: Ditto.
	* tests/data/test-*/test*report*.txt:: Ditto.

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 src/abg-leaf-reporter.cc                                       | 2 +-
 tests/data/test-abidiff-exit/test-leaf-peeling-report.txt      | 3 ---
 .../test-diff-filter/libtest45-basic-type-change-report-1.txt  | 2 --
 tests/data/test-diff-suppr/test36-leaf-report-0.txt            | 1 -
 4 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/abg-leaf-reporter.cc b/src/abg-leaf-reporter.cc
index a3c96432..16e8f365 100644
--- a/src/abg-leaf-reporter.cc
+++ b/src/abg-leaf-reporter.cc
@@ -74,7 +74,7 @@ report_diffs(const reporter_base& r,
       if (r.diff_to_be_reported((*i)->get_canonical_diff()))
 	{
 	  if (started_to_emit)
-	    out << "\n\n";
+	    out << "\n";
 
 	  string n = (*i)->first_subject()->get_pretty_representation();
 
diff --git a/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt b/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt
index c2e5e0fb..4d7d5754 100644
--- a/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt
+++ b/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt
@@ -11,20 +11,17 @@ Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
       type size changed from 32 to 64 (in bits)
     and size changed from 32 to 64 (in bits) (by +32 bits)
 
-
 'struct ops1 at test-leaf-peeling.0.cc:5:1' changed:
   type size hasn't changed
   there are data member changes:
     type 'int*' of 'ops1::x' changed:
       pointer type changed from: 'int*' to: 'int**'
 
-
 'struct ops2 at test-leaf-peeling.0.cc:9:1' changed:
   type size changed from 320 to 640 (in bits)
   there are data member changes:
     'foo ops2::y[10]' size changed from 320 to 640 (in bits) (by +320 bits)
 
-
 'struct ops3 at test-leaf-peeling.0.cc:13:1' changed:
   type size hasn't changed
   there are data member changes:
diff --git a/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt b/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt
index eecb84a0..3bea50c9 100644
--- a/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt
+++ b/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt
@@ -28,14 +28,12 @@ Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
     type 'int*' of 'S0::m0' changed:
       pointer type changed from: 'int*' to: 'char*'
 
-
 'struct S1 at test45-basic-type-change-v0.cc:13:1' changed:
   type size hasn't changed
   there are data member changes:
     type 'int*' of 'S1::m0' changed:
       pointer type changed from: 'int*' to: 'char*'
 
-
 'struct S2 at test45-basic-type-change-v0.cc:18:1' changed:
   type size hasn't changed
   there are data member changes:
diff --git a/tests/data/test-diff-suppr/test36-leaf-report-0.txt b/tests/data/test-diff-suppr/test36-leaf-report-0.txt
index 92de4df4..d270740d 100644
--- a/tests/data/test-diff-suppr/test36-leaf-report-0.txt
+++ b/tests/data/test-diff-suppr/test36-leaf-report-0.txt
@@ -12,7 +12,6 @@ Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
     function void interface2(struct_type&)
     function void interface3(struct_type**)
 
-
 'struct leaf2 at test36-leaf-v0.cc:9:1' changed:
   type size changed from 64 to 96 (in bits)
   there are data member changes:
-- 
2.25.1.696.g5e7596f4ac-goog


  parent reply	other threads:[~2020-03-27 14:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-27 14:00 [PATCH 0/7] Mostly whitespace changes and fixes Giuliano Procida
2020-03-27 14:00 ` [PATCH 1/7] abidiff: Clean up new lines between sections Giuliano Procida
2020-03-27 14:00 ` [PATCH 2/7] abidiff: Remove blank line after base class diffs Giuliano Procida
2020-03-27 14:00 ` [PATCH 3/7] abidiff: Fix enum impacted interfaces blank line Giuliano Procida
2020-03-27 14:00 ` [PATCH 4/7] abidiff: Remove member function diff blank lines Giuliano Procida
2020-03-30 14:13   ` Dodji Seketeli
2020-03-30 14:50     ` Giuliano Procida
2020-03-30 15:22       ` Dodji Seketeli
2020-03-27 14:00 ` [PATCH 5/7] abidiff: Fix variable declaration formatting Giuliano Procida
2020-03-27 14:00 ` Giuliano Procida [this message]
2020-03-27 14:00 ` [PATCH 7/7] abidiff: Remove new lines after parameter diffs Giuliano Procida
2020-03-29 17:29 ` [PATCH 0/7] Mostly whitespace changes and fixes Matthias Maennich
2020-03-31 10:37 ` Dodji Seketeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200327140017.1917-7-gprocida@google.com \
    --to=gprocida@google.com \
    --cc=dodji@seketeli.org \
    --cc=kernel-team@android.com \
    --cc=libabigail@sourceware.org \
    --cc=maennich@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).