Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15393782
D9108.id21646.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9108.id21646.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D9108: Minor improvements to the `ArcanistLintCheckstyleXMLRenderer` class.
Attached
Detach File
Event Timeline
Log In to Comment