Subject: [PATCH 11/18] checkbashisms: detect use of $FUNCNAME, $TMOUT, and $TIMEFORMAT

From: Raphael Geissert <[email-masked]>
Date: Mon, 22 Oct 2012 02:47:58 -0500

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

diff --git a/scripts/checkbashisms.pl b/scripts/checkbashisms.pl
index 55f93cc..356ecff 100755
--- a/scripts/checkbashisms.pl
+++ b/scripts/checkbashisms.pl
@@ -644,6 +644,11 @@ sub init_hashes {
 	qr'\$\{?SHELLOPTS\}?\b'       => q<$SHELLOPTS>,
 	qr'\$\{?PIPESTATUS\}?\b'      => q<$PIPESTATUS>,
 	qr'\$\{?SHLVL\}?\b'           => q<$SHLVL>,
+	qr'\$\{?FUNCNAME\}?\b'        => q<$FUNCNAME>,
+	qr'\$\{?TMOUT\}?\b'           => q<$TMOUT>,
+	qr'(?:^|\s+)TMOUT='           => q<TMOUT=>,
+	qr'\$\{?TIMEFORMAT\}?\b'      => q<$TIMEFORMAT>,
+	qr'(?:^|\s+)TIMEFORMAT='      => q<TIMEFORMAT=>,
 	qr'<<<'                       => q<\<\<\< here string>,
 	$LEADIN . qr'echo\s+(?:-[^e\s]+\s+)?\"[^\"]*(\\[abcEfnrtv0])+.*?[\"]' => q<unsafe echo with backslash>,
 	qr'\$\(\([\s\w$*/+-]*\w\+\+.*?\)\)'   => q<'$((n++))' should be '$n; $((n=n+1))'>,
-- 
1.7.10