From a25193cc5da6a271c4676e843db80ee19221822a Mon Sep 17 00:00:00 2001 From: Jeroen Vermeulen Date: Sun, 17 May 2015 20:04:04 +0700 Subject: Fix a lot of lint, mostly trailing whitespace. This is lint reported by the new lint-checking functionality in beautify.py. (We can change to a different lint checker if we have a better one, but it would probably still flag these same problems.) Lint checking can help a lot, but only if we get the lint under control. --- cruise-control/test_all_new_commits.sh | 6 +++--- cruise-control/web/html_templates.php | 2 +- cruise-control/web/log_wrapper.php | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'cruise-control') diff --git a/cruise-control/test_all_new_commits.sh b/cruise-control/test_all_new_commits.sh index 93ef30cf1..1e0a9c47f 100755 --- a/cruise-control/test_all_new_commits.sh +++ b/cruise-control/test_all_new_commits.sh @@ -115,7 +115,7 @@ function run_single_test () { if [ -z "$err" ]; then ./bjam $MCC_CONFIGURE_ARGS >> $longlog 2>&1 || err="bjam" fi - + echo "## regression tests" >> $longlog if [ -z "$err" ]; then ./bjam $MCC_CONFIGURE_ARGS --with-regtest=$regtest_dir >> $longlog 2>&1 || err="regression tests" @@ -158,7 +158,7 @@ function run_single_test () { status="FAIL:$err" fi echo "## Status: $status" >> $longlog - + nicedate=$(date +"%Y%m%d-%H%M%S") echo "$commit $status $configname $ccversion $nicedate" \ >> "$LOGDIR/brief.log" @@ -180,7 +180,7 @@ done # create info files for new commits for i in $(git rev-list $MCC_SCAN_BRANCHES); do first_char=$(echo $i | grep -o '^.') - mkdir -p "$LOGDIR/logs/$configname/$first_char" + mkdir -p "$LOGDIR/logs/$configname/$first_char" [ -f "$LOGDIR/logs/$configname/$first_char/$i.info" ] && break; git show $i | $MYDIR/shorten_info.pl > "$LOGDIR/logs/$configname/$first_char/$i.info" done diff --git a/cruise-control/web/html_templates.php b/cruise-control/web/html_templates.php index 83f6cc879..b7346914c 100644 --- a/cruise-control/web/html_templates.php +++ b/cruise-control/web/html_templates.php @@ -8,7 +8,7 @@ function show_header($title) $title "; -} +} function show_heading($text, $size = 1) { diff --git a/cruise-control/web/log_wrapper.php b/cruise-control/web/log_wrapper.php index af03db016..9fcf4db00 100644 --- a/cruise-control/web/log_wrapper.php +++ b/cruise-control/web/log_wrapper.php @@ -18,7 +18,7 @@ function get_all_branch_names() } class Branch -{ +{ public function __construct($name) { $this->name = $name; @@ -72,7 +72,7 @@ class Commit while (($line = fgets($log_hdl)) !== false) { if (preg_match('/tests passed/', $line)) { $this->passed_percent = substr($line, 0, strpos('%', $line)); - } + } else if (preg_match('/INVESTIGATE THESE FAILED TESTS/', $line)) { $this->failed_tests = substr($line, 39); } @@ -113,7 +113,7 @@ class Commit return file_exists(StaticData::logs_path . "/" . substr($this->name, 0, 1) . "/" . $this->name . ".OK"); } } - + public function get_status() { return $this->was_tested() @@ -157,12 +157,12 @@ class Commit public function get_log_file() { - return "show_commit.php?commit_id=$this->name&type=log"; + return "show_commit.php?commit_id=$this->name&type=log"; } public function get_info_file() { - return "show_commit.php?commit_id=$this->name&type=info"; + return "show_commit.php?commit_id=$this->name&type=info"; } private function open_log() @@ -182,7 +182,7 @@ class Commit private $message; private $author; private $timestamp; - + } ?> -- cgit v1.2.3