From 7cba11262458df05951432b54997eb40a35dbf9e Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 22 Sep 2008 01:35:58 +0000 Subject: [PATCH] Patch from Richard Godbee: Improve scan-build results to include the user's host name, the working directory of the analyzed project, and the date the analysis run took place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56421 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/scan-build | 93 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 86 insertions(+), 7 deletions(-) diff --git a/utils/scan-build b/utils/scan-build index 9317512cd3..f48b71d57c 100755 --- a/utils/scan-build +++ b/utils/scan-build @@ -19,6 +19,9 @@ use Digest::MD5; use File::Basename; use Term::ANSIColor; use Term::ANSIColor qw(:constants); +use Cwd; +use Sys::Hostname; +use File::Basename; my $Verbose = 0; # Verbose output from this script. my $Prog = "scan-build"; @@ -30,6 +33,17 @@ my $TERM = $ENV{'TERM'}; my $UseColor = (defined $TERM and $TERM eq 'xterm-color' and -t STDOUT and defined $ENV{'SCAN_BUILD_COLOR'}); +my $UserName = HtmlEscape(getpwuid($<) || 'unknown'); +my $HostName = HtmlEscape(hostname() || 'unknown'); +my $CurrentDir = HtmlEscape(getcwd()); +my $CurrentDirSuffix = basename($CurrentDir); + +my $CmdArgs; + +my $HtmlTitle; + +my $Date = localtime(); + ##----------------------------------------------------------------------------## # Diagnostics ##----------------------------------------------------------------------------## @@ -450,13 +464,15 @@ sub Postprocess { print OUT < +${HtmlTitle}