Skip to content

Commit aaa5c75

Browse files
staabmCopilot
andcommitted
Use plain URLs in GitHub annotations
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5f0a83c commit aaa5c75

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/Command/ErrorFormatter/GithubErrorFormatter.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private function buildFileSpecificMessage(Error $error, OutputFormatter $tipForm
9696

9797
$identifier = $error->getIdentifier();
9898
if ($identifier !== null) {
99-
$message .= sprintf("\n🪪 [%s](https://phpstan.org/error-identifiers/%s)", $identifier, $identifier);
99+
$message .= sprintf("\n🪪 %s: https://phpstan.org/error-identifiers/%s", $identifier, $identifier);
100100
if (!$error->canBeIgnored()) {
101101
$message .= ' (non-ignorable)';
102102
}

‎tests/PHPStan/Command/ErrorFormatter/GithubErrorFormatterTest.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ public function testFormatErrorsLikeTable(): void
131131
));
132132

133133
$this->assertSame(
134-
'::error file=foo.php,line=1,col=0::Fixable error%0A🔧 Can be fixed automatically. Run PHPStan again with --fix.%0A🪪 [foo.bar](https://phpstan.org/error-identifiers/foo.bar)
135-
::error file=foo.php,line=2,col=0::Non-ignorable error%0A🪪 [foo.baz](https://phpstan.org/error-identifiers/foo.baz) (non-ignorable)
134+
'::error file=foo.php,line=1,col=0::Fixable error%0A🔧 Can be fixed automatically. Run PHPStan again with --fix.%0A🪪 foo.bar: https://phpstan.org/error-identifiers/foo.bar
135+
::error file=foo.php,line=2,col=0::Non-ignorable error%0A🪪 foo.baz: https://phpstan.org/error-identifiers/foo.baz (non-ignorable)
136136
::error file=foo.php,line=3,col=0::Multi-line tip%0A💡 First line%0A💡 Second line in phpstan.neon
137137
::error file=foo.php,line=4,col=0::Tip with type%0A💡 Use array<int, string> instead.
138138
',

0 commit comments

Comments
 (0)