Skip to content

Commit 959bfea

Browse files
committed
Remove spaces between arguments
Blank spaces between the arguments of the GithubActionReporter messages make them appear always on line 1.
1 parent 17cbb9e commit 959bfea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CI/GithubActionReporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,6 @@ private function log(string $type, string $message, string $file = null, int $li
9494
return;
9595
}
9696

97-
$this->output->writeln(sprintf('::%s file=%s, line=%s, col=%s::%s', $type, strtr($file, self::ESCAPED_PROPERTIES), strtr($line ?? 1, self::ESCAPED_PROPERTIES), strtr($col ?? 0, self::ESCAPED_PROPERTIES), $message));
97+
$this->output->writeln(sprintf('::%s file=%s,line=%s,col=%s::%s', $type, strtr($file, self::ESCAPED_PROPERTIES), strtr($line ?? 1, self::ESCAPED_PROPERTIES), strtr($col ?? 0, self::ESCAPED_PROPERTIES), $message));
9898
}
9999
}

Tests/CI/GithubActionReporterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function annotationsFormatProvider(): iterable
6464
'foo/bar.php',
6565
2,
6666
4,
67-
'::warning file=foo/bar.php, line=2, col=4::A warning',
67+
'::warning file=foo/bar.php,line=2,col=4::A warning',
6868
];
6969

7070
yield 'with file property to escape' => [
@@ -73,7 +73,7 @@ public function annotationsFormatProvider(): iterable
7373
'foo,bar:baz%quz.php',
7474
2,
7575
4,
76-
'::warning file=foo%2Cbar%3Abaz%25quz.php, line=2, col=4::A warning',
76+
'::warning file=foo%2Cbar%3Abaz%25quz.php,line=2,col=4::A warning',
7777
];
7878

7979
yield 'without file ignores col & line' => ['warning', 'A warning', null, 2, 4, '::warning::A warning'];

0 commit comments

Comments
 (0)