Skip to content

Commit 8a554b3

Browse files
authored
Debug multiline (#28)
1 parent c2cc745 commit 8a554b3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ jobs:
2323

2424
- name: Run tests
2525
run: ./vendor/bin/phpunit
26-

src/Command/CheckDocsCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
130130
$this->io->error(sprintf('Build completed with %s errors', $issueCount));
131131
} elseif ('github' === $format) {
132132
foreach ($issues as $issue) {
133-
$this->io->writeln(sprintf('::error file=%s,line=%s::[%s] %s', $issue->getFile(), $issue->getLine(), $issue->getType(), str_replace(PHP_EOL, ' ', $issue->getText())));
133+
// We use urlencoded '\n'
134+
$text = str_replace(PHP_EOL, '%0A', $issue->getText());
135+
$this->io->writeln(sprintf('::error file=%s,line=%s::[%s] %s', $issue->getFile(), $issue->getLine(), $issue->getType(), $text));
134136
}
135137
}
136138

0 commit comments

Comments
 (0)