Subject: [PATCH 5/5] checkbashisms: warn when EOF is reached unexpectedly

From: Raphael Geissert <[email-masked]>
Date: Thu, 27 May 2010 16:25:38 -0500

Signed-off-by: Raphael Geissert <[email-masked]>
---
 scripts/checkbashisms.pl |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/scripts/checkbashisms.pl b/scripts/checkbashisms.pl
index dc79045..920106a 100755
--- a/scripts/checkbashisms.pl
+++ b/scripts/checkbashisms.pl
@@ -402,6 +402,14 @@ foreach my $filename (@ARGV) {
             }
 	}
     }
+
+    warn "error: $filename:  Unterminated heredoc found, EOF reached. Wanted: <$cat_string>\n"
+	if ($cat_string ne '');
+    warn "error: $filename: Unterminated quoted string found, EOF reached. Wanted: <$quote_string>\n"
+	if ($quote_string ne '');
+    warn "error: $filename: EOF reached while on line continuation.\n"
+	if ($buffered_line ne '');
+
     close C;
 }
 
-- 
1.7.1