Page MenuHomePhabricator

D9108.id21646.diff
No OneTemporary

D9108.id21646.diff

diff --git a/src/lint/renderer/ArcanistLintCheckstyleXMLRenderer.php b/src/lint/renderer/ArcanistLintCheckstyleXMLRenderer.php
--- a/src/lint/renderer/ArcanistLintCheckstyleXMLRenderer.php
+++ b/src/lint/renderer/ArcanistLintCheckstyleXMLRenderer.php
@@ -14,10 +14,13 @@
$this->writer->openMemory();
$this->writer->setIndent(true);
$this->writer->setIndentString(' ');
+ }
+ public function renderPreamble() {
$this->writer->startDocument('1.0', 'UTF-8');
$this->writer->startElement('checkstyle');
$this->writer->writeAttribute('version', '4.3');
+ return $this->writer->flush();
}
public function renderLintResult(ArcanistLintResult $result) {
diff --git a/src/lint/renderer/ArcanistLintRenderer.php b/src/lint/renderer/ArcanistLintRenderer.php
--- a/src/lint/renderer/ArcanistLintRenderer.php
+++ b/src/lint/renderer/ArcanistLintRenderer.php
@@ -7,6 +7,10 @@
*/
abstract class ArcanistLintRenderer {
+ public function renderPreamble() {
+ return '';
+ }
+
abstract public function renderLintResult(ArcanistLintResult $result);
abstract public function renderOkayResult();
diff --git a/src/workflow/ArcanistLintWorkflow.php b/src/workflow/ArcanistLintWorkflow.php
--- a/src/workflow/ArcanistLintWorkflow.php
+++ b/src/workflow/ArcanistLintWorkflow.php
@@ -469,6 +469,7 @@
}
$all_autofix = true;
+ $console->writeOut('%s', $renderer->renderPreamble());
foreach ($results as $result) {
$result_all_autofix = $result->isAllAutofix();

File Metadata

Mime Type
text/plain
Expires
Mar 16 2025, 11:06 PM (5 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7441091
Default Alt Text
D9108.id21646.diff (1 KB)

Event Timeline